aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 28cd839..24f8998 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3529,6 +3529,11 @@ void CompilerInvocation::GenerateLangArgs(const LangOptions &Opts,
if (Opts.CXXABI)
GenerateArg(Args, OPT_fcxx_abi_EQ, TargetCXXABI::getSpelling(*Opts.CXXABI),
SA);
+
+ if (Opts.RelativeCXXABIVTables)
+ GenerateArg(Args, OPT_fexperimental_relative_cxx_abi_vtables, SA);
+ else
+ GenerateArg(Args, OPT_fno_experimental_relative_cxx_abi_vtables, SA);
}
bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
@@ -4039,6 +4044,11 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
}
}
+ Opts.RelativeCXXABIVTables =
+ Args.hasFlag(options::OPT_fexperimental_relative_cxx_abi_vtables,
+ options::OPT_fno_experimental_relative_cxx_abi_vtables,
+ TargetCXXABI::usesRelativeVTables(T));
+
return Diags.getNumErrors() == NumErrorsBefore;
}