summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Korous <jkorous@apple.com>2019-09-07 00:59:13 +0000
committerJan Korous <jkorous@apple.com>2019-09-07 00:59:13 +0000
commitf1e1714519168dc89649a65704539e08d814df70 (patch)
tree79f35a4a23babb4daaf8a3fbb48b1fcabb608e60 /lib/Frontend/CompilerInvocation.cpp
parentfaa49beaa8d41821b3699ab734c1af44dc12ed81 (diff)
downloadclang-f1e1714519168dc89649a65704539e08d814df70.tar.gz
[clang][DependencyFileGenerator] Fix missing -MT option handling
Targets in DependencyFileGenerator don't necessarily come from -MT option. Differential Revision: https://reviews.llvm.org/D67308 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index f1624532f8..99713e5e16 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -3406,6 +3406,11 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), Args, Diags);
Success &= ParseMigratorArgs(Res.getMigratorOpts(), Args);
ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), Args);
+ if (!Res.getDependencyOutputOpts().OutputFile.empty() &&
+ Res.getDependencyOutputOpts().Targets.empty()) {
+ Diags.Report(diag::err_fe_dependency_file_requires_MT);
+ Success = false;
+ }
Success &=
ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags,
false /*DefaultDiagColor*/, false /*DefaultShowOpt*/);