xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/sparcv9-abi.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc struct pod {
4*0a6a1f1dSLionel Sambuc   int a, b;
5*0a6a1f1dSLionel Sambuc };
6*0a6a1f1dSLionel Sambuc 
7*0a6a1f1dSLionel Sambuc void f0();
8*0a6a1f1dSLionel Sambuc void f1(struct pod);
9*0a6a1f1dSLionel Sambuc 
10*0a6a1f1dSLionel Sambuc struct notpod {
11*0a6a1f1dSLionel Sambuc   int a, b;
~notpodnotpod12*0a6a1f1dSLionel Sambuc   ~notpod() { f0(); }
13*0a6a1f1dSLionel Sambuc };
14*0a6a1f1dSLionel Sambuc 
15*0a6a1f1dSLionel Sambuc void f2(struct notpod);
16*0a6a1f1dSLionel Sambuc 
17*0a6a1f1dSLionel Sambuc // CHECK-LABEL: caller
18*0a6a1f1dSLionel Sambuc // CHECK: call void @_Z2f13pod(i64
19*0a6a1f1dSLionel Sambuc // CHECK: call void @_Z2f26notpod(%struct.notpod*
caller()20*0a6a1f1dSLionel Sambuc void caller()
21*0a6a1f1dSLionel Sambuc {
22*0a6a1f1dSLionel Sambuc   pod p1;
23*0a6a1f1dSLionel Sambuc   notpod p2;
24*0a6a1f1dSLionel Sambuc   f1(p1);
25*0a6a1f1dSLionel Sambuc   f2(p2);
26*0a6a1f1dSLionel Sambuc }
27