If unable to create tmp. file on disk then return LTO_WRITE_FAILURE status.
[oota-llvm.git] / tools / lto / lto.cpp
index 372e6ea003538aebd47707909a2a990512e60523..a73795391671f442484e9e8cb89707396ec5f40c 100644 (file)
@@ -298,7 +298,7 @@ LinkTimeOptimizer::optimizeModules(const std::string &OutputFilename,
   std::string ErrMsg;
   if (tmpAsmFilePath.createTemporaryFileOnDisk(&ErrMsg)) {
     std::cerr << "lto: " << ErrMsg << "\n";
-    return;
+    return LTO_WRITE_FAILURE;
   }
   sys::RemoveFileOnSignal(tmpAsmFilePath);