[clang][SLH] Add __has_feature(speculative_load_hardening)
authorZola Bridges <zbrid@google.com>
Mon, 11 May 2020 18:27:29 +0000 (11:27 -0700)
committerZola Bridges <zbrid@google.com>
Mon, 11 May 2020 20:37:12 +0000 (13:37 -0700)
commit379e68a763097bed55556c6dc7453e4b732e3d68
treeb7495e13c992abed2cabe9304f6e03aaea5cf288
parent5f05c2f59a7fc666605a74e8616af17da8efa132
[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
clang/include/clang/Basic/Features.def
clang/include/clang/Basic/LangOptions.def
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp