aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/Object.cpp')
-rw-r--r--llvm/lib/Object/Object.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp
index b486e9f..0659cf6 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;
}