|
@@ -4193,15 +4193,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
(InputType == types::TY_C || InputType == types::TY_CXX)) {
|
|
|
Command *CLCommand = getCLFallback()->GetCommand(C, JA, Output, Inputs,
|
|
|
Args, LinkingOutput);
|
|
|
- // 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));
|
|
|
- }
|
|
|
+ C.addCommand(new FallbackCommand(JA, *this, Exec, CmdArgs, CLCommand));
|
|
|
} else {
|
|
|
C.addCommand(new Command(JA, *this, Exec, CmdArgs));
|
|
|
}
|
|
@@ -4446,9 +4438,10 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
|
|
|
if (Arg *A = Args.getLastArg(options::OPT_show_includes))
|
|
|
A->render(Args, CmdArgs);
|
|
|
|
|
|
- // RTTI is currently not supported, so disable it by default.
|
|
|
- if (!Args.hasArg(options::OPT_frtti, options::OPT_fno_rtti))
|
|
|
- CmdArgs.push_back("-fno-rtti");
|
|
|
+ // This controls whether or not we emit RTTI data for polymorphic types.
|
|
|
+ if (Args.hasFlag(options::OPT__SLASH_GR_, options::OPT__SLASH_GR,
|
|
|
+ /*default=*/false))
|
|
|
+ CmdArgs.push_back("-fno-rtti-data");
|
|
|
|
|
|
const Driver &D = getToolChain().getDriver();
|
|
|
EHFlags EH = parseClangCLEHFlags(D, Args);
|
|
@@ -7709,9 +7702,9 @@ Command *visualstudio::Compile::GetCommand(Compilation &C, const JobAction &JA,
|
|
|
// Flags for which clang-cl have an alias.
|
|
|
// FIXME: How can we ensure this stays in sync with relevant clang-cl options?
|
|
|
|
|
|
- if (Arg *A = Args.getLastArg(options::OPT_frtti, options::OPT_fno_rtti))
|
|
|
- CmdArgs.push_back(A->getOption().getID() == options::OPT_frtti ? "/GR"
|
|
|
- : "/GR-");
|
|
|
+ if (Args.hasFlag(options::OPT__SLASH_GR_, options::OPT__SLASH_GR,
|
|
|
+ /*default=*/false))
|
|
|
+ CmdArgs.push_back("/GR-");
|
|
|
if (Arg *A = Args.getLastArg(options::OPT_ffunction_sections,
|
|
|
options::OPT_fno_function_sections))
|
|
|
CmdArgs.push_back(A->getOption().getID() == options::OPT_ffunction_sections
|