forked from OSchip/llvm-project
[clang][slh] Add test for SLH feature checking macro
Summary: I forgot to include a test in this commit: https://reviews.llvm.org/rG379e68a763097bed55556c6dc7453e4b732e3d68 Here's the test. It passes after that commit and fails before that commit. Reviewed By: mattdr Differential Revision: https://reviews.llvm.org/D79894
This commit is contained in:
parent
03c44c7584
commit
18a855da43
|
@ -0,0 +1,15 @@
|
|||
// RUN: %clang -E -mspeculative-load-hardening %s -o - | FileCheck --check-prefix=CHECK-SLH %s
|
||||
// RUN: %clang -E -mno-speculative-load-hardening %s -o - | FileCheck --check-prefix=CHECK-NOSLH %s
|
||||
// RUN: %clang -E %s -o - | FileCheck --check-prefix=CHECK-DEFAULT %s
|
||||
|
||||
#if __has_feature(speculative_load_hardening)
|
||||
int SpeculativeLoadHardeningEnabled();
|
||||
#else
|
||||
int SpeculativeLoadHardeningDisabled();
|
||||
#endif
|
||||
|
||||
// CHECK-SLH: SpeculativeLoadHardeningEnabled
|
||||
|
||||
// CHECK-NOSLH: SpeculativeLoadHardeningDisabled
|
||||
|
||||
// CHECK-DEFAULT: SpeculativeLoadHardeningDisabled
|
Loading…
Reference in New Issue