summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Compilation.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-01 20:03:04 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-01 20:03:04 +0000
commit38bfda6ab52adf8e7668cbe379806490a7d1041f (patch)
treebbc2a39d653dd0b230b5871291fda38890916aec /clang/lib/Driver/Compilation.cpp
parent461f2bdcbe2d52a43198cefe28ddca303a86c6b5 (diff)
downloadbcm5719-llvm-38bfda6ab52adf8e7668cbe379806490a7d1041f.tar.gz
bcm5719-llvm-38bfda6ab52adf8e7668cbe379806490a7d1041f.zip
Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
- The Compilation is just a helper class, it shouldn't have that amount of logic in it. - No functionality change. llvm-svn: 74634
Diffstat (limited to 'clang/lib/Driver/Compilation.cpp')
-rw-r--r--clang/lib/Driver/Compilation.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp
index bdb39c7fecc..d7901a69e00 100644
--- a/clang/lib/Driver/Compilation.cpp
+++ b/clang/lib/Driver/Compilation.cpp
@@ -155,51 +155,3 @@ int Compilation::ExecuteJob(const Job &J,
return 0;
}
}
-
-int Compilation::Execute() const {
- // Just print if -### was present.
- if (getArgs().hasArg(options::OPT__HASH_HASH_HASH)) {
- PrintJob(llvm::errs(), Jobs, "\n", true);
- return 0;
- }
-
- // If there were errors building the compilation, quit now.
- if (getDriver().getDiags().getNumErrors())
- return 1;
-
- const Command *FailingCommand = 0;
- int Res = ExecuteJob(Jobs, FailingCommand);
-
- // Remove temp files.
- CleanupFileList(TempFiles);
-
- // If the compilation failed, remove result files as well.
- if (Res != 0 && !getArgs().hasArg(options::OPT_save_temps))
- CleanupFileList(ResultFiles, true);
-
- // Print extra information about abnormal failures, if possible.
- if (Res) {
- // This is ad-hoc, but we don't want to be excessively noisy. If the result
- // status was 1, assume the command failed normally. In particular, if it
- // was the compiler then assume it gave a reasonable error code. Failures in
- // other tools are less common, and they generally have worse diagnostics,
- // so always print the diagnostic there.
- const Action &Source = FailingCommand->getSource();
- bool IsFriendlyTool = (isa<PreprocessJobAction>(Source) ||
- isa<PrecompileJobAction>(Source) ||
- isa<AnalyzeJobAction>(Source) ||
- isa<CompileJobAction>(Source));
-
- if (!IsFriendlyTool || Res != 1) {
- // FIXME: See FIXME above regarding result code interpretation.
- if (Res < 0)
- getDriver().Diag(clang::diag::err_drv_command_signalled)
- << Source.getClassName() << -Res;
- else
- getDriver().Diag(clang::diag::err_drv_command_failed)
- << Source.getClassName() << Res;
- }
- }
-
- return Res;
-}
OpenPOWER on IntegriCloud