diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
| commit | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (patch) | |
| tree | f42add1021b9f2ac6a69ac7cf6c4499962739a45 /llvm/lib/Object/Object.cpp | |
| parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) | |
Diffstat (limited to 'llvm/lib/Object/Object.cpp')
| -rw-r--r-- | llvm/lib/Object/Object.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp index b486e9f5c9a8..0659cf6a2d41 100644 --- a/llvm/lib/Object/Object.cpp +++ b/llvm/lib/Object/Object.cpp @@ -222,8 +222,7 @@ void LLVMMoveToContainingSection(LLVMSectionIteratorRef Sect, std::string Buf; raw_string_ostream OS(Buf); logAllUnhandledErrors(SecOrErr.takeError(), OS); - OS.flush(); - report_fatal_error(Buf); + report_fatal_error(Twine(OS.str())); } *unwrap(Sect) = *SecOrErr; } @@ -304,8 +303,7 @@ const char *LLVMGetSymbolName(LLVMSymbolIteratorRef SI) { std::string Buf; raw_string_ostream OS(Buf); logAllUnhandledErrors(Ret.takeError(), OS); - OS.flush(); - report_fatal_error(Buf); + report_fatal_error(Twine(OS.str())); } return Ret->data(); } @@ -316,8 +314,7 @@ uint64_t LLVMGetSymbolAddress(LLVMSymbolIteratorRef SI) { std::string Buf; raw_string_ostream OS(Buf); logAllUnhandledErrors(Ret.takeError(), OS); - OS.flush(); - report_fatal_error(Buf); + report_fatal_error(Twine(OS.str())); } return *Ret; } |
