summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-05-14 16:03:05 +0000
committerReid Kleckner <reid@kleckner.net>2014-05-14 16:03:05 +0000
commit47c2f84c9d9401d35899a5f96902960d333c12bf (patch)
tree080be82cd3cd1bca54c872176b8c15575ae02d9b /clang/lib/Driver/Tools.cpp
parentcf87e10f9db91f0c4eed6c3f49e7b83ea2126660 (diff)
downloadbcm5719-llvm-47c2f84c9d9401d35899a5f96902960d333c12bf.tar.gz
bcm5719-llvm-47c2f84c9d9401d35899a5f96902960d333c12bf.zip
clang-cl: Fall back immediately if /GR and /fallback were both passed
None of our tests use /fallback, so this lets us gradually add RTTI support without breaking projects using /fallback. llvm-svn: 208787
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 1f9e12bb538..afef7008fad 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4106,7 +4106,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
tools::visualstudio::Compile CL(getToolChain());
Command *CLCommand = CL.GetCommand(C, JA, Output, Inputs, Args,
LinkingOutput);
- C.addCommand(new FallbackCommand(JA, *this, Exec, CmdArgs, CLCommand));
+ // RTTI support in clang-cl is a work in progress. Fall back to MSVC early
+ // if we are using 'clang-cl /fallback /GR'.
+ // FIXME: Remove this when RTTI is finished.
+ if (Args.hasFlag(options::OPT_frtti, options::OPT_fno_rtti, false)) {
+ D.Diag(diag::warn_drv_rtti_fallback) << CLCommand->getExecutable();
+ C.addCommand(CLCommand);
+ } else {
+ C.addCommand(new FallbackCommand(JA, *this, Exec, CmdArgs, CLCommand));
+ }
} else {
C.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
OpenPOWER on IntegriCloud