summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/attr-speculative-load-hardening.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/attr-speculative-load-hardening.c')
-rw-r--r--clang/test/CodeGen/attr-speculative-load-hardening.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/attr-speculative-load-hardening.c b/clang/test/CodeGen/attr-speculative-load-hardening.c
new file mode 100644
index 00000000000..ccbded44bb4
--- /dev/null
+++ b/clang/test/CodeGen/attr-speculative-load-hardening.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -mspeculative-load-hardening -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=SLH
+//
+// Check that we set the attribute on each function.
+
+int test1() {
+ return 42;
+}
+// SLH: @{{.*}}test1{{.*}}[[SLH:#[0-9]+]]
+
+// SLH: attributes [[SLH]] = { {{.*}}speculative_load_hardening{{.*}} }
OpenPOWER on IntegriCloud