diff options
author | Chad Rosier <mcrosier@apple.com> | 2013-01-29 23:57:10 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2013-01-29 23:57:10 +0000 |
commit | 8425a5413b437a0b6ac04c475e7cf54cc9977880 (patch) | |
tree | a12d724266b9430d7ee1733d25928dc23cb53499 /lib/Driver/Driver.cpp | |
parent | 658a115c8e0d5bddf607a13d2ce13cd306ef2389 (diff) |
[driver] Clear the FailureResultFiles when initializing clang diagnostics. Also,
minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 0ba61a3de8..3ede6e3288 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -398,6 +398,12 @@ void Driver::generateCompilationDiagnostics(Compilation &C, } } + if (Inputs.empty()) { + Diag(clang::diag::note_drv_command_failed_diag_msg) + << "Error generating preprocessed source(s) - no preprocessable inputs."; + return; + } + // Don't attempt to generate preprocessed files if multiple -arch options are // used, unless they're all duplicates. llvm::StringSet<> ArchNames; @@ -416,12 +422,6 @@ void Driver::generateCompilationDiagnostics(Compilation &C, return; } - if (Inputs.empty()) { - Diag(clang::diag::note_drv_command_failed_diag_msg) - << "Error generating preprocessed source(s) - no preprocessable inputs."; - return; - } - // Construct the list of abstract actions to perform for this compilation. On // Darwin OSes this uses the driver-driver and builds universal actions. const ToolChain &TC = C.getDefaultToolChain(); |