1 // RUN: %clang_cc1 -triple powerpc-ibm-aix %s -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 -S -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 -S -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 -S -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 // RUN: not %clang -mdefault-visibility-export-mapping=explicit -target powerpc-unknown-linux %s 2>&1 | \
13 // RUN: FileCheck -check-prefix=ERROR %s
14 // ERROR: unsupported option '-mdefault-visibility-export-mapping=explicit' for target 'powerpc-unknown-linux'
16 // UNSPECIFIED-DEF: define void @func()
17 // UNSPECIFIED-HID: define hidden void @func()
18 // UNSPECIFIED-EXP: define dllexport void @func()
21 #pragma GCC visibility push(default)
22 // EXPLICIT-DEF: define void @pragmafunc()
23 // EXPLICIT-EXP: define dllexport void @pragmafunc()
25 #pragma GCC visibility pop
27 // EXPLICIT-DEF: define void @explicitfunc()
28 // EXPLICIT-EXP: define dllexport void @explicitfunc()
29 void __attribute__((visibility("default"))) explicitfunc() {}