[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / loongarch-mlam-bh.c
blob6f2901e594dfcc4963c775da58ad4f6abbb0ed4d
1 /// Test -m[no]lam-bh options.
3 // RUN: %clang --target=loongarch64 -mlam-bh -fsyntax-only %s -### 2>&1 | \
4 // RUN: FileCheck %s --check-prefix=CC1-LAM-BH
5 // RUN: %clang --target=loongarch64 -mno-lam-bh -fsyntax-only %s -### 2>&1 | \
6 // RUN: FileCheck %s --check-prefix=CC1-NO-LAM-BH
7 // RUN: %clang --target=loongarch64 -mno-lam-bh -mlam-bh -fsyntax-only %s -### 2>&1 | \
8 // RUN: FileCheck %s --check-prefix=CC1-LAM-BH
9 // RUN: %clang --target=loongarch64 -mlam-bh -mno-lam-bh -fsyntax-only %s -### 2>&1 | \
10 // RUN: FileCheck %s --check-prefix=CC1-NO-LAM-BH
12 // RUN: %clang --target=loongarch64 -mlam-bh -S -emit-llvm %s -o - | \
13 // RUN: FileCheck %s --check-prefix=IR-LAM-BH
14 // RUN: %clang --target=loongarch64 -mno-lam-bh -S -emit-llvm %s -o - | \
15 // RUN: FileCheck %s --check-prefix=IR-NO-LAM-BH
16 // RUN: %clang --target=loongarch64 -mno-lam-bh -mlam-bh -S -emit-llvm %s -o - | \
17 // RUN: FileCheck %s --check-prefix=IR-LAM-BH
18 // RUN: %clang --target=loongarch64 -mlam-bh -mno-lam-bh -S -emit-llvm %s -o - | \
19 // RUN: FileCheck %s --check-prefix=IR-NO-LAM-BH
22 // CC1-LAM-BH: "-target-feature" "+lam-bh"
23 // CC1-NO-LAM-BH: "-target-feature" "-lam-bh"
25 // IR-LAM-BH: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}+lam-bh{{(,.*)?}}"
26 // IR-NO-LAM-BH: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}-lam-bh{{(,.*)?}}"
28 int foo(void) {
29 return 42;