aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2020-06-10 12:48:10 -0700
committerLeonard Chan <leonardchan@google.com>2020-06-10 12:48:10 -0700
commit2e009dbcb3e373a59e6e84dce6d51ae8a29f60a5 (patch)
tree4d9760aba6e24dd99308be026eab837d4aa461da /clang/lib/Frontend/CompilerInvocation.cpp
parentc5bbdea9e120dda9632a71708a852cb32317ed92 (diff)
downloadllvm-2e009dbcb3e373a59e6e84dce6d51ae8a29f60a5.zip
llvm-2e009dbcb3e373a59e6e84dce6d51ae8a29f60a5.tar.gz
llvm-2e009dbcb3e373a59e6e84dce6d51ae8a29f60a5.tar.bz2
[clang] Frontend components for the relative vtables ABI
This patch contains all of the clang changes from D72959. - Generalize the relative vtables ABI such that it can be used by other targets. - Add an enum VTableComponentLayout which controls whether components in the vtable should be pointers to other structs or relative offsets to those structs. Other ABIs can change this enum to restructure how components in the vtable are laid out/accessed. - Add methods to ConstantInitBuilder for inserting relative offsets to a specified position in the aggregate being constructed. See D72959 for background info. Differential Revision: https://reviews.llvm.org/D77592
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 29e92ce..3aea916 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3410,6 +3410,11 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
Opts.CompatibilityQualifiedIdBlockParamTypeChecking =
Args.hasArg(OPT_fcompatibility_qualified_id_block_param_type_checking);
+
+ Opts.RelativeCXXABIVTables =
+ Args.hasFlag(OPT_fexperimental_relative_cxx_abi_vtables,
+ OPT_fno_experimental_relative_cxx_abi_vtables,
+ /*default=*/false);
}
static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {