diff options
| author | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-04-28 22:24:44 +0000 |
|---|---|---|
| committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-04-28 22:24:44 +0000 |
| commit | f44157d6ab113b88aab4fd0a1efc9ba24d2b7e74 (patch) | |
| tree | 964be7fb97d956ba1f3953d821352ed74195da2b /clang/lib/Driver | |
| parent | 3468d9d92911601cd62f56ac50b21a2d0580ee0a (diff) | |
| download | bcm5719-llvm-f44157d6ab113b88aab4fd0a1efc9ba24d2b7e74.tar.gz bcm5719-llvm-f44157d6ab113b88aab4fd0a1efc9ba24d2b7e74.zip | |
When Driver::generateCompilationDiagnostics is filtering the list of
inputs to the preprocessor, check for invalid types first because not
all linker inputs have an option value to retrieve.
llvm-svn: 207454
Diffstat (limited to 'clang/lib/Driver')
| -rw-r--r-- | clang/lib/Driver/Driver.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index be83713b605..a238e37c1db 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -447,13 +447,14 @@ void Driver::generateCompilationDiagnostics(Compilation &C, bool IgnoreInput = false; // Ignore input from stdin or any inputs that cannot be preprocessed. - if (!strcmp(it->second->getValue(), "-")) { + // Check type first as not all linker inputs have a value. + if (types::getPreprocessedType(it->first) == types::TY_INVALID) { + IgnoreInput = true; + } else if (!strcmp(it->second->getValue(), "-")) { Diag(clang::diag::note_drv_command_failed_diag_msg) << "Error generating preprocessed source(s) - ignoring input from stdin" "."; IgnoreInput = true; - } else if (types::getPreprocessedType(it->first) == types::TY_INVALID) { - IgnoreInput = true; } if (IgnoreInput) { |

