aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-03 09:13:30 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-03 09:13:30 +0000
commit360435908c9b90429cfe192fab22854af1d4497c (patch)
tree811eef92f526e70fe19714ebc6f5c8a1b0d85c23 /lib/Frontend/CompilerInstance.cpp
parent43adb7e9e9bc906210e265c637738b9a962fb6b6 (diff)
Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r--lib/Frontend/CompilerInstance.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index b6c79fb7bc..f36a56032b 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -328,9 +328,9 @@ CompilerInstance::createOutputFile(llvm::StringRef OutputPath,
InFile, Extension,
&OutputPathName);
if (!OS) {
- // FIXME: Don't fail this way.
- llvm::errs() << "error: " << Error << "\n";
- ::exit(1);
+ getDiagnostics().Report(diag::err_fe_unable_to_open_output)
+ << OutputPath << Error;
+ return 0;
}
// Add the output file -- but don't try to remove "-", since this means we are