aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-08-25 11:12:58 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-10-23 18:27:07 +0000
commit62987288060ff68c817b7056815aa9fb8ba8ecd7 (patch)
treed7953c9488f71e79d26c924169988f16e9ba9cee /contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
parent52418fc2be8efa5172b90a3a9e617017173612c4 (diff)
parentadf62863f35c84e4c5708f3dc5a1589ce958a238 (diff)
Diffstat (limited to 'contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp b/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
index f6b6c44a4cab..028fdb2cc6b9 100644
--- a/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1504,6 +1504,8 @@ void CompilerInvocation::setDefaultPointerAuthOptions(
Opts.CXXMemberFunctionPointers =
PointerAuthSchema(Key::ASIA, false, Discrimination::Type);
}
+ Opts.ReturnAddresses = LangOpts.PointerAuthReturns;
+ Opts.AuthTraps = LangOpts.PointerAuthAuthTraps;
Opts.IndirectGotos = LangOpts.PointerAuthIndirectGotos;
}
@@ -1511,7 +1513,8 @@ static void parsePointerAuthOptions(PointerAuthOptions &Opts,
const LangOptions &LangOpts,
const llvm::Triple &Triple,
DiagnosticsEngine &Diags) {
- if (!LangOpts.PointerAuthCalls && !LangOpts.PointerAuthIndirectGotos)
+ if (!LangOpts.PointerAuthCalls && !LangOpts.PointerAuthReturns &&
+ !LangOpts.PointerAuthAuthTraps && !LangOpts.PointerAuthIndirectGotos)
return;
CompilerInvocation::setDefaultPointerAuthOptions(Opts, LangOpts, Triple);