summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 34cd79c2a6e..54f5a6b4c50 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -163,9 +163,9 @@ bool LTOCodeGenerator::writeMergedModules(const char *path,
applyScopeRestrictions();
// create output file
- std::string ErrInfo;
- tool_output_file Out(path, ErrInfo, sys::fs::F_None);
- if (!ErrInfo.empty()) {
+ std::error_code EC;
+ tool_output_file Out(path, EC, sys::fs::F_None);
+ if (EC) {
errMsg = "could not open bitcode file for writing: ";
errMsg += path;
return false;
OpenPOWER on IntegriCloud