26 lines · c
1// RUN: %clang_cc1 -triple loongarch64 -target-feature +f -target-feature +d -target-abi lp64d -emit-llvm %s -o - | \2// RUN: FileCheck --check-prefix=CHECK-C %s3// RUN: %clang_cc1 -triple loongarch64 -target-feature +f -target-feature +d -target-abi lp64d -emit-llvm %s -o - -x c++ | \4// RUN: FileCheck --check-prefix=CHECK-CXX %s5 6#include <stdint.h>7 8// CHECK-C: define{{.*}} void @test1()9// CHECK-CXX: define{{.*}} i64 @_Z5test12u1(i64{{[^,]*}})10union u1 { };11union u1 test1(union u1 a) {12 return a;13}14 15struct s1 {16 union u1 u;17 int i;18 float f;19};20 21// CHECK-C: define{{.*}} { i32, float } @test2(i32{{[^,]*}}, float{{[^,]*}})22// CHECK-CXX: define{{.*}} [2 x i64] @_Z5test22s1([2 x i64]{{[^,]*}})23struct s1 test2(struct s1 a) {24 return a;25}26