diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-03 09:13:30 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-03 09:13:30 +0000 |
commit | 7554699afabfb2594ebb96a6db64d3c7cb2eade4 (patch) | |
tree | 6f582488842c3dee2285277ee4998fb988e35e5a /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 692bc47d25a637e4215d4c1bc3ff4f5a7f9c57f5 (diff) | |
download | bcm5719-llvm-7554699afabfb2594ebb96a6db64d3c7cb2eade4.tar.gz bcm5719-llvm-7554699afabfb2594ebb96a6db64d3c7cb2eade4.zip |
Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.
llvm-svn: 90437
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index b6c79fb7bc4..f36a56032b2 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/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 |