[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / attr-speculative-load-hardening.c
blob7dfbe36a82e08695b5e0369ca52c3dba25de0816
1 // RUN: %clang_cc1 -mspeculative-load-hardening -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefix=SLH
2 // RUN: %clang -mno-speculative-load-hardening -S -emit-llvm %s -o - | FileCheck %s -check-prefix=NOSLH
3 //
4 // Check that we set the attribute on each function.
6 int test1(void) {
7 return 42;
9 // SLH: @{{.*}}test1{{.*}}[[SLH:#[0-9]+]]
11 // SLH: attributes [[SLH]] = { {{.*}}speculative_load_hardening{{.*}} }
13 // NOSLH: @{{.*}}test1{{.*}}[[NOSLH:#[0-9]+]]
15 // NOSLH-NOT: attributes [[NOSLH]] = { {{.*}}speculative_load_hardening{{.*}} }