diff options
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(); |