summaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-xray/xray-stacks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-xray/xray-stacks.cpp')
-rw-r--r--llvm/tools/llvm-xray/xray-stacks.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/tools/llvm-xray/xray-stacks.cpp b/llvm/tools/llvm-xray/xray-stacks.cpp
index cf292887b6b8a..1e4490289534d 100644
--- a/llvm/tools/llvm-xray/xray-stacks.cpp
+++ b/llvm/tools/llvm-xray/xray-stacks.cpp
@@ -674,11 +674,12 @@ std::string CreateErrorMessage(StackTrie::AccountRecordStatus Error,
const FuncIdConversionHelper &Converter) {
switch (Error) {
case StackTrie::AccountRecordStatus::ENTRY_NOT_FOUND:
- return formatv("Found record {0} with no matching function entry\n",
- format_xray_record(Record, Converter));
+ return std::string(
+ formatv("Found record {0} with no matching function entry\n",
+ format_xray_record(Record, Converter)));
default:
- return formatv("Unknown error type for record {0}\n",
- format_xray_record(Record, Converter));
+ return std::string(formatv("Unknown error type for record {0}\n",
+ format_xray_record(Record, Converter)));
}
}