summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/arm64-constructor-return.cpp
blob: 54d6cfcff8bd3a5acf5a219df2edbc232092d9ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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: ptr @_ZN1SC2Ev(ptr {{[^,]*}} %this)

// CHECK: ptr @_ZN1SC1Ev(ptr {{[^,]*}} returned align 4 dereferenceable(4) %this)
// CHECK: [[THISADDR:%[a-zA-Z0-9.]+]] = alloca ptr
// CHECK: store ptr %this, ptr [[THISADDR]]
// CHECK: [[THIS1:%.*]] = load ptr, ptr [[THISADDR]]
// CHECK: ret ptr [[THIS1]]