aboutsummaryrefslogblamecommitdiff
path: root/test/CodeGenCXX/arm64-constructor-return.cpp
blob: 3adc1b7a280eb4a3eddccf242c206fea037f279b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                 
                                                                   
                                  
// RUN: %clang_cc1 %s -triple=arm64-apple-ios7.0.0 -emit-llvm -o - | FileCheck %s
// rdar://12162905

struct S {
  S();
  int iField;
};

S::S() {
  iField = 1;
};

// CHECK: %struct.S* @_ZN1SC2Ev(%struct.S* returned %this)

// CHECK: %struct.S* @_ZN1SC1Ev(%struct.S* returned %this)
// CHECK: [[THISADDR:%[a-zA-z0-9.]+]] = alloca %struct.S*
// CHECK: store %struct.S* %this, %struct.S** [[THISADDR]]
// CHECK: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THISADDR]]
// CHECK: ret %struct.S* [[THIS1]]