xref: /llvm-project/clang/test/CodeGenObjC/attr-speculative-load-hardening.m (revision 46b0d0eef9e0a7290851cce0d44002b750584f1b)
1// RUN: %clang -emit-llvm %s -o - -S | FileCheck %s -check-prefix=SLH
2
3int main(void) __attribute__((speculative_load_hardening)) {
4  return 0;
5}
6
7int test(void) __attribute__((no_speculative_load_hardening)) {
8  return 0;
9}
10
11// SLH: @{{.*}}main{{.*}}[[SLH:#[0-9]+]]
12// SLH: @{{.*}}test{{.*}}[[NOSLH:#[0-9]+]]
13// SLH: attributes [[SLH]] = { {{.*}}speculative_load_hardening{{.*}} }
14// SLH-NOT: attributes [[NOSLH]] = { {{.*}}speculative_load_hardening{{.*}} }
15