mirror of https://github.com/microsoft/clang.git
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:
parent
05654ff22e
commit
201d3fb13c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue