brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 99b40f9 Raw
42 lines · c
1// RUN: %clang_cc1 -Werror -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s2// RUN: %clang_cc1 -Werror -triple i386-linux -emit-llvm -o - %s | FileCheck %s3// RUN: %clang_cc1 -Werror -triple armv7-linux -emit-llvm -o - %s | FileCheck %s --check-prefix=ARM4// RUN: %clang_cc1 -Werror -triple powerpc64le-linux -emit-llvm -o - %s | FileCheck %s5// RUN: %clang_cc1 -Werror -triple aarch64-linux -emit-llvm -o - %s | FileCheck %s6// RUN: %clang_cc1 -DINFRONT -Werror -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s7// RUN: %clang_cc1 -DINFRONT -Werror -triple i386-linux -emit-llvm -o - %s | FileCheck %s8// RUN: %clang_cc1 -DINFRONT -Werror -triple armv7-linux -emit-llvm -o - %s | FileCheck %s --check-prefix=ARM9// RUN: %clang_cc1 -DINFRONT -Werror -triple powerpc64le-linux -emit-llvm -o - %s | FileCheck %s10// RUN: %clang_cc1 -DINFRONT -Werror -triple aarch64-linux -emit-llvm -o - %s | FileCheck %s11 12#ifdef INFRONT13typedef union __attribute__((transparent_union)) {14  void *f0;15} transp_t0;16#else17typedef union {18  void *f0;19} transp_t0 __attribute__((transparent_union));20#endif21 22void f0(transp_t0 obj);23 24// CHECK-LABEL: define{{.*}} void @f1_0(ptr noundef %a0)25// CHECK:  call void @f0(ptr %{{.*}})26// CHECK:  call void %{{.*}}(ptr noundef %{{[a-z0-9]*}})27// CHECK: }28 29// ARM-LABEL: define{{.*}} arm_aapcscc void @f1_0(ptr noundef %a0)30// ARM:  call arm_aapcscc void @f0(ptr %{{.*}})31// ARM:  call arm_aapcscc void %{{.*}}(ptr noundef %{{[a-z0-9]*}})32// ARM: }33void f1_0(int *a0) {34  void (*f0p)(void *) = f0;35  f0(a0);36  f0p(a0);37}38 39void f1_1(int *a0) {40  f0((transp_t0) { a0 });41}42