Skip to content

Commit 9c4bd7e

Browse files
author
git apple-llvm automerger
committed
Merge commit '749083b91f31' from llvm.org/main into next
2 parents 47c987d + 749083b commit 9c4bd7e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 %s
3+
// 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 %s
5+
6+
#include <stdint.h>
7+
8+
// CHECK-C: define{{.*}} void @test1()
9+
// CHECK-CXX: define{{.*}} i64 @_Z5test12u1(i64{{[^,]*}})
10+
union u1 { };
11+
union u1 test1(union u1 a) {
12+
return a;
13+
}
14+
15+
struct s1 {
16+
union u1 u;
17+
int i;
18+
float f;
19+
};
20+
21+
// CHECK-C: define{{.*}} { i32, float } @test2(i32{{[^,]*}}, float{{[^,]*}})
22+
/// FIXME: This doesn't match g++.
23+
// CHECK-CXX: define{{.*}} { i32, float } @_Z5test22s1(i32{{[^,]*}}, float{{[^,]*}})
24+
struct s1 test2(struct s1 a) {
25+
return a;
26+
}

0 commit comments

Comments
 (0)