Driver: Return 0 from BuildCompilation on -ccc-print-phases,

-ccc-print-options.

llvm-svn: 66907
This commit is contained in:
Daniel Dunbar 2009-03-13 17:24:34 +00:00
parent ed50f6c356
commit 3efedddcf9
2 changed files with 6 additions and 4 deletions

View File

@ -152,7 +152,7 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
// FIXME: This behavior shouldn't be here.
if (CCCPrintOptions) {
PrintOptions(*Args);
exit(0);
return 0;
}
if (!HandleImmediateArgs(*Args))
@ -166,12 +166,12 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
else
BuildActions(*Args, Actions);
// FIXME: This behavior shouldn't be here.
if (CCCPrintActions) {
PrintActions(*Args, Actions);
exit(0);
return 0;
}
assert(0 && "FIXME: Implement");
return new Compilation();

View File

@ -52,6 +52,8 @@ int main(int argc, const char **argv) {
// If there were errors building the compilation, quit now.
if (Diags.getNumErrors())
return 1;
if (!C.get())
return 0;
return C->Execute();
}