diff options
-rw-r--r-- | lib/Driver/Driver.cpp | 8 | ||||
-rw-r--r-- | tools/driver/driver.cpp | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index d09aa18d22..fcfa9adca4 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -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(); diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index 645a3ff11a..fd0cc9cbb8 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -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(); } |