aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-10-05 18:34:02 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-10-05 18:42:12 +0100
commit2e5daac21731eb27ef952efaad31cac2a5d8f254 (patch)
tree257dfe763a27a5b01eb22be93c8e8603c53bd539 /llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
parent5bc32ad08d9a25b1a4fc4fe7daa4056d1d1ef67f (diff)
downloadllvm-2e5daac21731eb27ef952efaad31cac2a5d8f254.zip
llvm-2e5daac21731eb27ef952efaad31cac2a5d8f254.tar.gz
llvm-2e5daac21731eb27ef952efaad31cac2a5d8f254.tar.bz2
[llvm] Update report_fatal_error calls from raw_string_ostream to use Twine(OS.str())
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared. We can use the raw_string_ostream::str() method to perform the implicit flush() and return a reference to the std::string container that we can then wrap inside Twine().
Diffstat (limited to 'llvm/unittests/Analysis/TargetLibraryInfoTest.cpp')
-rw-r--r--llvm/unittests/Analysis/TargetLibraryInfoTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
index 8c0422a..1a8d307 100644
--- a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
+++ b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
@@ -37,7 +37,7 @@ protected:
Error.print("", os);
if (!M)
- report_fatal_error(os.str());
+ report_fatal_error(Twine(os.str()));
}
::testing::AssertionResult isLibFunc(const Function *FDecl,