diff options
author | Zola Bridges <zbrid@google.com> | 2020-05-11 11:27:29 -0700 |
---|---|---|
committer | Zola Bridges <zbrid@google.com> | 2020-05-11 13:37:12 -0700 |
commit | 379e68a763097bed55556c6dc7453e4b732e3d68 (patch) | |
tree | b7495e13c992abed2cabe9304f6e03aaea5cf288 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 5f05c2f59a7fc666605a74e8616af17da8efa132 (diff) | |
download | llvm-379e68a763097bed55556c6dc7453e4b732e3d68.zip llvm-379e68a763097bed55556c6dc7453e4b732e3d68.tar.gz llvm-379e68a763097bed55556c6dc7453e4b732e3d68.tar.bz2 |
[clang][SLH] Add __has_feature(speculative_load_hardening)
SLH doesn't support asm goto and is unlikely to ever support it. Users of asm
goto need a way to choose whether to use asm goto or fallback to an SLH
compatible code path when SLH is enabled. This feature flag will give users
this ability.
Tested via unit test
Reviewed By: mattdr
Differential Revision: https://reviews.llvm.org/D79733
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2d6f4be..649e78e 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3382,6 +3382,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, } Opts.BranchTargetEnforcement = Args.hasArg(OPT_mbranch_target_enforce); + Opts.SpeculativeLoadHardening = Args.hasArg(OPT_mspeculative_load_hardening); } static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { |