We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03c44c7 commit 18a855dCopy full SHA for 18a855d
clang/test/Lexer/has_feature_speculative_load_hardening.cpp
@@ -0,0 +1,15 @@
1
+// RUN: %clang -E -mspeculative-load-hardening %s -o - | FileCheck --check-prefix=CHECK-SLH %s
2
+// RUN: %clang -E -mno-speculative-load-hardening %s -o - | FileCheck --check-prefix=CHECK-NOSLH %s
3
+// RUN: %clang -E %s -o - | FileCheck --check-prefix=CHECK-DEFAULT %s
4
+
5
+#if __has_feature(speculative_load_hardening)
6
+int SpeculativeLoadHardeningEnabled();
7
+#else
8
+int SpeculativeLoadHardeningDisabled();
9
+#endif
10
11
+// CHECK-SLH: SpeculativeLoadHardeningEnabled
12
13
+// CHECK-NOSLH: SpeculativeLoadHardeningDisabled
14
15
+// CHECK-DEFAULT: SpeculativeLoadHardeningDisabled
0 commit comments