Indicate success for simple options when clang called with -cc1.

Patch by David Wiberg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-08-07 12:54:47 +00:00
parent 05654ff22e
commit 201d3fb13c
2 changed files with 7 additions and 3 deletions

View File

@ -183,7 +183,7 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) {
Opts->PrintHelp(llvm::outs(), "clang -cc1",
"LLVM 'Clang' Compiler: http://clang.llvm.org",
/*Include=*/ driver::options::CC1Option, /*Exclude=*/ 0);
return 0;
return true;
}
// Honor -version.
@ -191,7 +191,7 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) {
// FIXME: Use a better -version message?
if (Clang->getFrontendOpts().ShowVersion) {
llvm::cl::PrintVersionMessage();
return 0;
return true;
}
// Load any requested plugins.
@ -223,7 +223,7 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) {
// This should happen AFTER plugins have been loaded!
if (Clang->getAnalyzerOpts()->ShowCheckerHelp) {
ento::printCheckerHelp(llvm::outs(), Clang->getFrontendOpts().Plugins);
return 0;
return true;
}
#endif

View File

@ -0,0 +1,4 @@
// cc1 immediate arguments (arguments which displays information and exits)
// shall exit indicating success (return code 0)
// RUN: %clang -cc1 -help
// RUN: %clang -cc1 -version