diff options
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
| -rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 08cf0ae6b2c2..08f3b7a7fcc4 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1542,6 +1542,17 @@ void CompilerInvocation::setDefaultPointerAuthOptions( Discrimination::Constant, InitFiniPointerConstantDiscriminator); } + Opts.BlockInvocationFunctionPointers = + PointerAuthSchema(Key::ASIA, true, Discrimination::None); + Opts.BlockHelperFunctionPointers = + PointerAuthSchema(Key::ASIA, true, Discrimination::None); + Opts.BlockByrefHelperFunctionPointers = + PointerAuthSchema(Key::ASIA, true, Discrimination::None); + if (LangOpts.PointerAuthBlockDescriptorPointers) + Opts.BlockDescriptorPointers = + PointerAuthSchema(Key::ASDA, true, Discrimination::Constant, + BlockDescriptorConstantDiscriminator); + Opts.ObjCMethodListFunctionPointers = PointerAuthSchema(Key::ASIA, true, Discrimination::None); Opts.ObjCMethodListPointer = @@ -3598,6 +3609,8 @@ static void GeneratePointerAuthArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_fptrauth_objc_interface_sel); if (Opts.PointerAuthObjcClassROPointers) GenerateArg(Consumer, OPT_fptrauth_objc_class_ro); + if (Opts.PointerAuthBlockDescriptorPointers) + GenerateArg(Consumer, OPT_fptrauth_block_descriptor_pointers); } static void ParsePointerAuthArgs(LangOptions &Opts, ArgList &Args, @@ -3621,7 +3634,8 @@ static void ParsePointerAuthArgs(LangOptions &Opts, ArgList &Args, Opts.PointerAuthELFGOT = Args.hasArg(OPT_fptrauth_elf_got); Opts.AArch64JumpTableHardening = Args.hasArg(OPT_faarch64_jump_table_hardening); - + Opts.PointerAuthBlockDescriptorPointers = + Args.hasArg(OPT_fptrauth_block_descriptor_pointers); Opts.PointerAuthObjcIsa = Args.hasArg(OPT_fptrauth_objc_isa); Opts.PointerAuthObjcClassROPointers = Args.hasArg(OPT_fptrauth_objc_class_ro); Opts.PointerAuthObjcInterfaceSel = |
