blob: 97bccd03585c3945f2a03516a3d77ce9fe4741ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// RUN: %clang_cc1 -mspeculative-load-hardening -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=SLH
// RUN: %clang -mno-speculative-load-hardening -S -emit-llvm %s -o - | FileCheck %s -check-prefix=NOSLH
//
// Check that we set the attribute on each function.
int test1() {
return 42;
}
// SLH: @{{.*}}test1{{.*}}[[SLH:#[0-9]+]]
// SLH: attributes [[SLH]] = { {{.*}}speculative_load_hardening{{.*}} }
// NOSLH: @{{.*}}test1{{.*}}[[NOSLH:#[0-9]+]]
// NOSLH-NOT: attributes [[SLH]] = { {{.*}}speculative_load_hardening{{.*}} }
|