[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / clang / test / CodeGen / mdefault-visibility-export-mapping.c
blob92c9177c7e69550645eec9a790d150e68db4ebff
1 // RUN: %clang_cc1 -triple powerpc-ibm-aix %s -emit-llvm -o - | \
2 // RUN: FileCheck -check-prefixes=UNSPECIFIED-DEF,EXPLICIT-DEF %s
3 // RUN: %clang_cc1 -triple powerpc-ibm-aix %s -mdefault-visibility-export-mapping=none -emit-llvm -o - | \
4 // RUN: FileCheck -check-prefixes=UNSPECIFIED-DEF,EXPLICIT-DEF %s
5 // RUN: %clang_cc1 -triple powerpc-ibm-aix %s -mdefault-visibility-export-mapping=explicit -emit-llvm -o - | \
6 // RUN: FileCheck -check-prefixes=UNSPECIFIED-DEF,EXPLICIT-EXP %s
7 // RUN: %clang_cc1 -triple powerpc-ibm-aix %s -mdefault-visibility-export-mapping=all -emit-llvm -o - | \
8 // RUN: FileCheck -check-prefixes=UNSPECIFIED-EXP,EXPLICIT-EXP %s
9 // RUN: %clang -target powerpc-ibm-aix %s -mdefault-visibility-export-mapping=all -fvisibility=hidden -S -emit-llvm -o - | \
10 // RUN: FileCheck -check-prefixes=UNSPECIFIED-HID,EXPLICIT-EXP %s
12 // UNSPECIFIED-DEF: define void @func()
13 // UNSPECIFIED-HID: define hidden void @func()
14 // UNSPECIFIED-EXP: define dllexport void @func()
15 void func() {}
17 #pragma GCC visibility push(default)
18 // EXPLICIT-DEF: define void @pragmafunc()
19 // EXPLICIT-EXP: define dllexport void @pragmafunc()
20 void pragmafunc() {}
21 #pragma GCC visibility pop
23 // EXPLICIT-DEF: define void @explicitfunc()
24 // EXPLICIT-EXP: define dllexport void @explicitfunc()
25 void __attribute__((visibility("default"))) explicitfunc() {}