
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
16 lines
553 B
C++
16 lines
553 B
C++
// 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
|