[clang] 3512721 - [CodeGenCXX] Convert more tests to opaque pointers (NFC)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 01:01:31 PDT 2022
Author: Nikita Popov
Date: 2022-10-07T10:01:17+02:00
New Revision: 3512721d52b3380ea4d3f5b2419d0b7b072e7797
URL: https://github.com/llvm/llvm-project/commit/3512721d52b3380ea4d3f5b2419d0b7b072e7797
DIFF: https://github.com/llvm/llvm-project/commit/3512721d52b3380ea4d3f5b2419d0b7b072e7797.diff
LOG: [CodeGenCXX] Convert more tests to opaque pointers (NFC)
Conversion was performed using
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34
plus manual (but uninteresting) fixups.
Added:
Modified:
clang/test/CodeGenCXX/block-capture.cpp
clang/test/CodeGenCXX/constructors.cpp
clang/test/CodeGenCXX/copy-constructor-elim-2.cpp
clang/test/CodeGenCXX/cxx-apple-kext.cpp
clang/test/CodeGenCXX/cxx0x-initializer-references.cpp
clang/test/CodeGenCXX/debug-info-nrvo.cpp
clang/test/CodeGenCXX/debug-info-template.cpp
clang/test/CodeGenCXX/default-arg-temps.cpp
clang/test/CodeGenCXX/derived-to-base-conv.cpp
clang/test/CodeGenCXX/ext-int.cpp
clang/test/CodeGenCXX/float16-declarations.cpp
clang/test/CodeGenCXX/global-dtor-no-atexit.cpp
clang/test/CodeGenCXX/goto.cpp
clang/test/CodeGenCXX/init-invariant.cpp
clang/test/CodeGenCXX/lifetime-sanitizer.cpp
clang/test/CodeGenCXX/mangle-lambdas-cxx14.cpp
clang/test/CodeGenCXX/mangle-lambdas-cxx20.cpp
clang/test/CodeGenCXX/member-expressions.cpp
clang/test/CodeGenCXX/microsoft-abi-vftables.cpp
clang/test/CodeGenCXX/microsoft-abi-vmemptr-vbase.cpp
clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp
clang/test/CodeGenCXX/new-array-init.cpp
clang/test/CodeGenCXX/new-overflow.cpp
clang/test/CodeGenCXX/new.cpp
clang/test/CodeGenCXX/no-odr-use.cpp
clang/test/CodeGenCXX/no-unique-address.cpp
clang/test/CodeGenCXX/noescape.cpp
clang/test/CodeGenCXX/non-const-init-cxx2a.cpp
clang/test/CodeGenCXX/observe-noexcept.cpp
clang/test/CodeGenCXX/partial-destruction.cpp
clang/test/CodeGenCXX/pass-object-size.cpp
clang/test/CodeGenCXX/pointers-to-data-members.cpp
clang/test/CodeGenCXX/ppc32-varargs-method.cpp
clang/test/CodeGenCXX/pragma-pack-2.cpp
clang/test/CodeGenCXX/pragma-pack.cpp
clang/test/CodeGenCXX/reference-init.cpp
clang/test/CodeGenCXX/reference-temporary-ms.cpp
clang/test/CodeGenCXX/references.cpp
clang/test/CodeGenCXX/rtti-linkage.cpp
clang/test/CodeGenCXX/rvalue-references.cpp
clang/test/CodeGenCXX/stack-reuse-exceptions.cpp
clang/test/CodeGenCXX/stack-reuse.cpp
clang/test/CodeGenCXX/static-init.cpp
clang/test/CodeGenCXX/strict-vtable-pointers.cpp
clang/test/CodeGenCXX/tail-padding.cpp
clang/test/CodeGenCXX/template-param-objects.cpp
clang/test/CodeGenCXX/temporaries.cpp
clang/test/CodeGenCXX/throw-expressions.cpp
clang/test/CodeGenCXX/thunks.cpp
clang/test/CodeGenCXX/trivial-auto-var-init.cpp
clang/test/CodeGenCXX/trivial_abi.cpp
clang/test/CodeGenCXX/try-catch.cpp
clang/test/CodeGenCXX/type-metadata.cpp
clang/test/CodeGenCXX/typeid-cxx11.cpp
clang/test/CodeGenCXX/ubsan-devirtualized-calls.cpp
clang/test/CodeGenCXX/ubsan-vtable-checks.cpp
clang/test/CodeGenCXX/value-init.cpp
clang/test/CodeGenCXX/vcall-visibility-metadata.cpp
clang/test/CodeGenCXX/virtual-bases.cpp
clang/test/CodeGenCXX/virtual-destructor-calls.cpp
clang/test/CodeGenCXX/virtual-function-elimination.cpp
clang/test/CodeGenCXX/vla-lambda-capturing.cpp
clang/test/CodeGenCXX/volatile-1.cpp
clang/test/CodeGenCXX/volatile.cpp
clang/test/CodeGenCXX/vtable-available-externally.cpp
clang/test/CodeGenCXX/vtable-consteval.cpp
clang/test/CodeGenCXX/vtable-constexpr.cpp
clang/test/CodeGenCXX/vtable-key-function-win-comdat.cpp
clang/test/CodeGenCXX/x86_64-arguments.cpp
Removed:
################################################################################
diff --git a/clang/test/CodeGenCXX/block-capture.cpp b/clang/test/CodeGenCXX/block-capture.cpp
index b905aab5d31e1..c235d97bf5fbc 100644
--- a/clang/test/CodeGenCXX/block-capture.cpp
+++ b/clang/test/CodeGenCXX/block-capture.cpp
@@ -1,12 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -std=c++11 -fblocks -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -fblocks -emit-llvm %s -o - | FileCheck %s
-// CHECK: %struct.__block_byref_baz = type { i8*, %struct.__block_byref_baz*, i32, i32, i32 }
+// CHECK: %struct.__block_byref_baz = type { ptr, ptr, i32, i32, i32 }
// CHECK: [[baz:%[0-9a-z_]*]] = alloca %struct.__block_byref_baz
-// CHECK: [[bazref:%[0-9a-z_\.]*]] = getelementptr inbounds %struct.__block_byref_baz, %struct.__block_byref_baz* [[baz]], i32 0, i32 1
-// CHECK: store %struct.__block_byref_baz* [[baz]], %struct.__block_byref_baz** [[bazref]]
-// CHECK: bitcast %struct.__block_byref_baz* [[baz]] to i8*
-// CHECK: [[disposable:%[0-9a-z_]*]] = bitcast %struct.__block_byref_baz* [[baz]] to i8*
-// CHECK: call void @_Block_object_dispose(i8* [[disposable]]
+// CHECK: [[bazref:%[0-9a-z_\.]*]] = getelementptr inbounds %struct.__block_byref_baz, ptr [[baz]], i32 0, i32 1
+// CHECK: store ptr [[baz]], ptr [[bazref]]
+// CHECK: call void @_Block_object_dispose(ptr [[baz]]
int main() {
__block int baz = [&]() { return 0; }();
diff --git a/clang/test/CodeGenCXX/constructors.cpp b/clang/test/CodeGenCXX/constructors.cpp
index 590f997184f38..24ec726f549eb 100644
--- a/clang/test/CodeGenCXX/constructors.cpp
+++ b/clang/test/CodeGenCXX/constructors.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 %s -emit-llvm -o - | FileCheck %s --implicit-check-not=should_not_appear_in_output --check-prefixes=CHECK,NULL-INVALID
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 %s -emit-llvm -fno-delete-null-pointer-checks -o - | FileCheck %s --implicit-check-not=should_not_appear_in_output --check-prefixes=CHECK,NULL-VALID
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -emit-llvm -o - | FileCheck %s --implicit-check-not=should_not_appear_in_output --check-prefixes=CHECK,NULL-INVALID
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -emit-llvm -fno-delete-null-pointer-checks -o - | FileCheck %s --implicit-check-not=should_not_appear_in_output --check-prefixes=CHECK,NULL-VALID
struct Member { int x; Member(); Member(int); Member(const Member &); };
struct VBase { int x; VBase(); VBase(int); VBase(const VBase &); };
@@ -22,20 +22,20 @@ struct A {
A::A(struct Undeclared &ref) : mem(0) {}
// Check that delegation works.
-// NULL-INVALID-LABEL: define{{.*}} void @_ZN1AC2ER10Undeclared(%struct.A* {{[^,]*}} %this, %struct.Undeclared* noundef nonnull align 1 %ref) unnamed_addr
-// NULL-VALID-LABEL: define{{.*}} void @_ZN1AC2ER10Undeclared(%struct.A* {{[^,]*}} %this, %struct.Undeclared* noundef align 1 %ref) unnamed_addr
+// NULL-INVALID-LABEL: define{{.*}} void @_ZN1AC2ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef nonnull align 1 %ref) unnamed_addr
+// NULL-VALID-LABEL: define{{.*}} void @_ZN1AC2ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef align 1 %ref) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
-// NULL-INVALID-LABEL: define{{.*}} void @_ZN1AC1ER10Undeclared(%struct.A* {{[^,]*}} %this, %struct.Undeclared* noundef nonnull align 1 %ref) unnamed_addr
-// NULL-VALID-LABEL: define{{.*}} void @_ZN1AC1ER10Undeclared(%struct.A* {{[^,]*}} %this, %struct.Undeclared* noundef align 1 %ref) unnamed_addr
+// NULL-INVALID-LABEL: define{{.*}} void @_ZN1AC1ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef nonnull align 1 %ref) unnamed_addr
+// NULL-VALID-LABEL: define{{.*}} void @_ZN1AC1ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef align 1 %ref) unnamed_addr
// CHECK: call void @_ZN1AC2ER10Undeclared(
A::A(ValueClass v) : mem(v.y - v.x) {}
-// CHECK-LABEL: define{{.*}} void @_ZN1AC2E10ValueClass(%struct.A* {{[^,]*}} %this, i64 %v.coerce) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1AC2E10ValueClass(ptr {{[^,]*}} %this, i64 %v.coerce) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
-// CHECK-LABEL: define{{.*}} void @_ZN1AC1E10ValueClass(%struct.A* {{[^,]*}} %this, i64 %v.coerce) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1AC1E10ValueClass(ptr {{[^,]*}} %this, i64 %v.coerce) unnamed_addr
// CHECK: call void @_ZN1AC2E10ValueClass(
/* Test that things work for inheritance. */
@@ -46,13 +46,13 @@ struct B : A {
B::B(struct Undeclared &ref) : A(ref), mem(1) {}
-// NULL-INVALID-LABEL: define{{.*}} void @_ZN1BC2ER10Undeclared(%struct.B* {{[^,]*}} %this, %struct.Undeclared* noundef nonnull align 1 %ref) unnamed_addr
-// NULL-VALID-LABEL: define{{.*}} void @_ZN1BC2ER10Undeclared(%struct.B* {{[^,]*}} %this, %struct.Undeclared* noundef align 1 %ref) unnamed_addr
+// NULL-INVALID-LABEL: define{{.*}} void @_ZN1BC2ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef nonnull align 1 %ref) unnamed_addr
+// NULL-VALID-LABEL: define{{.*}} void @_ZN1BC2ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef align 1 %ref) unnamed_addr
// CHECK: call void @_ZN1AC2ER10Undeclared(
// CHECK: call void @_ZN6MemberC1Ei(
-// NULL-INVALID-LABEL: define{{.*}} void @_ZN1BC1ER10Undeclared(%struct.B* {{[^,]*}} %this, %struct.Undeclared* noundef nonnull align 1 %ref) unnamed_addr
-// NULL-VALID-LABEL: define{{.*}} void @_ZN1BC1ER10Undeclared(%struct.B* {{[^,]*}} %this, %struct.Undeclared* noundef align 1 %ref) unnamed_addr
+// NULL-INVALID-LABEL: define{{.*}} void @_ZN1BC1ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef nonnull align 1 %ref) unnamed_addr
+// NULL-VALID-LABEL: define{{.*}} void @_ZN1BC1ER10Undeclared(ptr {{[^,]*}} %this, ptr noundef align 1 %ref) unnamed_addr
// CHECK: call void @_ZN1BC2ER10Undeclared(
@@ -67,10 +67,10 @@ struct C : virtual A {
};
C::C(int x) : A(ValueClass(x, x+1)), mem(x * x) {}
-// CHECK-LABEL: define{{.*}} void @_ZN1CC2Ei(%struct.C* {{[^,]*}} %this, i8** noundef %vtt, i32 noundef %x) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1CC2Ei(ptr {{[^,]*}} %this, ptr noundef %vtt, i32 noundef %x) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
-// CHECK-LABEL: define{{.*}} void @_ZN1CC1Ei(%struct.C* {{[^,]*}} %this, i32 noundef %x) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1CC1Ei(ptr {{[^,]*}} %this, i32 noundef %x) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
@@ -85,12 +85,12 @@ struct D : A {
D::D(int x, ...) : A(ValueClass(x, x+1)), mem(x*x) {}
-// CHECK-LABEL: define{{.*}} void @_ZN1DC2Eiz(%struct.D* {{[^,]*}} %this, i32 noundef %x, ...) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1DC2Eiz(ptr {{[^,]*}} %this, i32 noundef %x, ...) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
-// CHECK-LABEL: define{{.*}} void @_ZN1DC1Eiz(%struct.D* {{[^,]*}} %this, i32 noundef %x, ...) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1DC1Eiz(ptr {{[^,]*}} %this, i32 noundef %x, ...) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
@@ -111,7 +111,7 @@ namespace test1 {
struct B { B(); int x; A a[0]; };
B::B() {}
// CHECK-LABEL: define{{.*}} void @_ZN5test11BC2Ev(
- // CHECK: [[THIS:%.*]] = load [[B:%.*]]*, [[B:%.*]]**
+ // CHECK: [[THIS:%.*]] = load ptr, ptr
// CHECK-NEXT: ret void
}
diff --git a/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp b/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp
index 195c92c301c86..a8ce437da831b 100644
--- a/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp
+++ b/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %std_cxx11-14 -no-opaque-pointers -no-enable-noundef-analysis -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,PRE17
-// RUN: %clang_cc1 %std_cxx17- -no-opaque-pointers -no-enable-noundef-analysis -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,CXX17
+// RUN: %clang_cc1 %std_cxx11-14 -no-enable-noundef-analysis -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,PRE17
+// RUN: %clang_cc1 %std_cxx17- -no-enable-noundef-analysis -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,CXX17
struct A { int x; A(int); ~A(); };
A f() { return A(0); }
@@ -22,7 +22,7 @@ namespace no_elide_base {
Derived(const Other &O);
};
- // CHECK: define {{.*}} @_ZN13no_elide_base7DerivedC1ERKNS_5OtherE(%"struct.no_elide_base::Derived"* {{[^,]*}} returned {{[^,]*}} %this, %"struct.no_elide_base::Other"* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %O) unnamed_addr
+ // CHECK: define {{.*}} @_ZN13no_elide_base7DerivedC1ERKNS_5OtherE(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %O) unnamed_addr
Derived::Derived(const Other &O)
// CHECK: call {{.*}} @_ZNK13no_elide_base5OthercvNS_4BaseEEv
// PRE17: call {{.*}} @_ZN13no_elide_base4BaseC2ERKS0_
@@ -68,7 +68,7 @@ namespace PR12139 {
// CHECK-LABEL: define{{.*}} i32 @_ZN7PR121394testEv
int test() {
// CHECK: call void @_ZN7PR121391A5makeAEv
- // CHECK-NEXT: call %"struct.PR12139::A"* @_ZN7PR121391AC1ERKS0_i
+ // CHECK-NEXT: call ptr @_ZN7PR121391AC1ERKS0_i
A a(A::makeA(), 3);
// CHECK-NEXT: getelementptr inbounds
// CHECK-NEXT: load
diff --git a/clang/test/CodeGenCXX/cxx-apple-kext.cpp b/clang/test/CodeGenCXX/cxx-apple-kext.cpp
index aea4ded8977cf..be763522b8dc8 100644
--- a/clang/test/CodeGenCXX/cxx-apple-kext.cpp
+++ b/clang/test/CodeGenCXX/cxx-apple-kext.cpp
@@ -1,6 +1,6 @@
-// RUN: %clangxx -Xclang -no-opaque-pointers -target x86_64-apple-darwin10 %s -flto -S -o - |\
+// RUN: %clangxx -target x86_64-apple-darwin10 %s -flto -S -o - |\
// RUN: FileCheck --check-prefix=CHECK-NO-KEXT %s
-// RUN: %clangxx -Xclang -no-opaque-pointers -target x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\
+// RUN: %clangxx -target x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\
// RUN: FileCheck --check-prefix=CHECK-KEXT %s
// CHECK-NO-KEXT-NOT: _GLOBAL__D_a
@@ -15,7 +15,7 @@
// CHECK-KEXT-NOT: declare i32 @__cxa_atexit
// CHECK-KEXT: @is_freestanding ={{.*}} global
// CHECK-KEXT: _GLOBAL__D_a
-// CHECK-KEXT: call void @_ZN3fooD1Ev(%class.foo* @a)
+// CHECK-KEXT: call void @_ZN3fooD1Ev(ptr @a)
class foo {
public:
diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp
index a0cc75a530f6f..bbf525be873cf 100644
--- a/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp
+++ b/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -S -triple armv7-none-eabi -fmerge-all-constants -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -S -triple armv7-none-eabi -fmerge-all-constants -emit-llvm -o - %s | FileCheck %s
// This creates and lifetime-extends a 'const char[5]' temporary.
// CHECK: @_ZGR19extended_string_ref_ = internal constant [5 x i8] c"hi\00\00\00",
-// CHECK: @extended_string_ref ={{.*}} constant [5 x i8]* @_ZGR19extended_string_ref_,
+// CHECK: @extended_string_ref ={{.*}} constant ptr @_ZGR19extended_string_ref_,
const char (&extended_string_ref)[5] = {"hi"};
// This binds directly to a string literal object.
-// CHECK: @nonextended_string_ref ={{.*}} constant [3 x i8]* @.str
+// CHECK: @nonextended_string_ref ={{.*}} constant ptr @.str
const char (&nonextended_string_ref)[3] = {"hi"};
namespace reference {
@@ -18,27 +18,26 @@ namespace reference {
// No superfluous instructions allowed here, they could be
// hiding extra temporaries.
- // CHECK: store i32 1, i32*
- // CHECK-NEXT: store i32* %{{.*}}, i32**
+ // CHECK: store i32 1, ptr
+ // CHECK-NEXT: store ptr %{{.*}}, ptr
const int &cri2a = 1;
- // CHECK-NEXT: store i32 1, i32*
- // CHECK-NEXT: store i32* %{{.*}}, i32**
+ // CHECK-NEXT: store i32 1, ptr
+ // CHECK-NEXT: store ptr %{{.*}}, ptr
const int &cri1a = {1};
- // CHECK-NEXT: store i32 1, i32*
+ // CHECK-NEXT: store i32 1, ptr
int i = 1;
- // CHECK-NEXT: store i32* %{{.*}}, i32**
+ // CHECK-NEXT: store ptr %{{.*}}, ptr
int &ri1a = {i};
- // CHECK-NEXT: bitcast
// CHECK-NEXT: memcpy
A a{1, 2};
- // CHECK-NEXT: store %{{.*}}* %{{.*}}, %{{.*}}** %
+ // CHECK-NEXT: store ptr %{{.*}}, ptr %
A &ra1a = {a};
using T = A&;
- // CHECK-NEXT: store %{{.*}}* %{{.*}}, %{{.*}}** %
+ // CHECK-NEXT: store ptr %{{.*}}, ptr %
A &ra1b = T{a};
// CHECK-NEXT: ret
@@ -48,25 +47,25 @@ namespace reference {
// CHECK: getelementptr {{.*}}, i32 0, i32 0
// CHECK-NEXT: store i32 1
// CHECK-NEXT: getelementptr {{.*}}, i32 0, i32 1
- // CHECK-NEXT: %[[I1:.*]] = load i32, i32*
+ // CHECK-NEXT: %[[I1:.*]] = load i32, ptr
// CHECK-NEXT: store i32 %[[I1]]
- // CHECK-NEXT: store %{{.*}}* %{{.*}}, %{{.*}}** %{{.*}}, align
+ // CHECK-NEXT: store ptr %{{.*}}, ptr %{{.*}}, align
const A &ra1{1, i};
- // CHECK-NEXT: getelementptr inbounds [3 x i32], [3 x i32]* %{{.*}}, i{{32|64}} 0, i{{32|64}} 0
+ // CHECK-NEXT: getelementptr inbounds [3 x i32], ptr %{{.*}}, i{{32|64}} 0, i{{32|64}} 0
// CHECK-NEXT: store i32 1
- // CHECK-NEXT: getelementptr inbounds i32, i32* %{{.*}}, i{{32|64}} 1
+ // CHECK-NEXT: getelementptr inbounds i32, ptr %{{.*}}, i{{32|64}} 1
// CHECK-NEXT: store i32 2
- // CHECK-NEXT: getelementptr inbounds i32, i32* %{{.*}}, i{{32|64}} 1
- // CHECK-NEXT: %[[I2:.*]] = load i32, i32*
+ // CHECK-NEXT: getelementptr inbounds i32, ptr %{{.*}}, i{{32|64}} 1
+ // CHECK-NEXT: %[[I2:.*]] = load i32, ptr
// CHECK-NEXT: store i32 %[[I2]]
- // CHECK-NEXT: store [3 x i32]* %{{.*}}, [3 x i32]** %{{.*}}, align
+ // CHECK-NEXT: store ptr %{{.*}}, ptr %{{.*}}, align
const int (&arrayRef)[] = {1, 2, i};
- // CHECK: store %{{.*}}* @{{.*}}, %{{.*}}** %{{.*}}, align
+ // CHECK: store ptr @{{.*}}, ptr %{{.*}}, align
const A &constra1{1, 2};
- // CHECK-NEXT: store [3 x i32]* @{{.*}}, [3 x i32]** %{{.*}}, align
+ // CHECK-NEXT: store ptr @{{.*}}, ptr %{{.*}}, align
const int (&constarrayRef)[] = {1, 2, 3};
// CHECK-NEXT: ret
@@ -81,10 +80,10 @@ namespace reference {
{
// Ensure lifetime extension.
- // CHECK: call noundef %"struct.reference::B"* @_ZN9reference1BC1Ev
- // CHECK-NEXT: store %{{.*}}* %{{.*}}, %{{.*}}** %
+ // CHECK: call noundef ptr @_ZN9reference1BC1Ev
+ // CHECK-NEXT: store ptr %{{.*}}, ptr %
const B &rb{ B() };
- // CHECK: call noundef %"struct.reference::B"* @_ZN9reference1BD1Ev
+ // CHECK: call noundef ptr @_ZN9reference1BD1Ev
}
}
diff --git a/clang/test/CodeGenCXX/debug-info-nrvo.cpp b/clang/test/CodeGenCXX/debug-info-nrvo.cpp
index f3db0052d6c9b..6916207b8806a 100644
--- a/clang/test/CodeGenCXX/debug-info-nrvo.cpp
+++ b/clang/test/CodeGenCXX/debug-info-nrvo.cpp
@@ -1,7 +1,7 @@
-// RUN: %clangxx -Xclang -no-opaque-pointers -target x86_64-unknown-unknown -g \
+// RUN: %clangxx -target x86_64-unknown-unknown -g \
// RUN: %s -emit-llvm -S -o - | FileCheck %s
-// RUN: %clangxx -Xclang -no-opaque-pointers -target x86_64-unknown-unknown -g \
+// RUN: %clangxx -target x86_64-unknown-unknown -g \
// RUN: -fno-elide-constructors %s -emit-llvm -S -o - | \
// RUN: FileCheck %s -check-prefix=NOELIDE
@@ -26,10 +26,10 @@ int main() {
// Check that NRVO variables are stored as a pointer with deref if they are
// stored in the return register.
-// CHECK: %[[RESULT:.*]] = alloca i8*, align 8
-// CHECK: call void @llvm.dbg.declare(metadata i8** %[[RESULT]],
+// CHECK: %[[RESULT:.*]] = alloca ptr, align 8
+// CHECK: call void @llvm.dbg.declare(metadata ptr %[[RESULT]],
// CHECK-SAME: metadata !DIExpression(DW_OP_deref)
// NOELIDE: %[[FOO:.*]] = alloca %struct.Foo, align 4
-// NOELIDE: call void @llvm.dbg.declare(metadata %struct.Foo* %[[FOO]],
+// NOELIDE: call void @llvm.dbg.declare(metadata ptr %[[FOO]],
// NOELIDE-SAME: metadata !DIExpression()
diff --git a/clang/test/CodeGenCXX/debug-info-template.cpp b/clang/test/CodeGenCXX/debug-info-template.cpp
index d97b9df8a3609..4ea2b20c74d0e 100644
--- a/clang/test/CodeGenCXX/debug-info-template.cpp
+++ b/clang/test/CodeGenCXX/debug-info-template.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang -Xclang -no-opaque-pointers -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++20 | FileCheck %s
+// RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++20 | FileCheck %s
// CHECK: @tci = dso_local global %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>::nested" zeroinitializer, align 1, !dbg [[TCI:![0-9]+]]
// CHECK: @tcn = dso_local global %struct.TC zeroinitializer, align 1, !dbg [[TCN:![0-9]+]]
@@ -40,7 +40,7 @@ TC
< unsigned,
// CHECK: [[TCARG2]] = !DITemplateValueParameter(type: [[UINT]], value: i32 2)
2,
-// CHECK: [[TCARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR:![0-9]*]], value: i32* @glb)
+// CHECK: [[TCARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR:![0-9]*]], value: ptr @glb)
// CHECK: [[CINTPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, {{.*}}baseType: [[CINT:![0-9]+]]
// CHECK: [[CINT]] = !DIDerivedType(tag: DW_TAG_const_type, {{.*}}baseType: [[INT:![0-9]+]]
// CHECK: [[INT]] = !DIBasicType(name: "int"
@@ -69,10 +69,10 @@ TC
// CHECK: [[FUNTYPE:![0-9]*]] = !DISubroutineType(types: [[FUNARGS:![0-9]*]])
// CHECK: [[FUNARGS]] = !{null}
&foo::e,
-// CHECK: [[TCARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR:![0-9]*]], value: { i64, i64 } { i64 ptrtoint (void (%struct.foo*)* @_ZN3foo1fEv to i64), i64 0 })
+// CHECK: [[TCARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR:![0-9]*]], value: { i64, i64 } { i64 ptrtoint (ptr @_ZN3foo1fEv to i64), i64 0 })
// CHECK: [[MEMFUNPTR]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[FTYPE]], {{.*}}extraData: ![[FOO]])
&foo::f,
-// CHECK: [[TCARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR:![0-9]*]], value: void ()* @_ZN3foo1gEv)
+// CHECK: [[TCARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR:![0-9]*]], value: ptr @_ZN3foo1gEv)
// CHECK: [[FUNPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[FUNTYPE]]
&foo::g,
// CHECK: [[TCARG7]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[TCARG7_VALS:![0-9]*]])
@@ -134,7 +134,7 @@ struct NN {
// CHECK-SAME: identifier:
// CHECK: [[NNARGS]] = !{[[NNARG1:![0-9]*]], [[NNARG2:![0-9]*]]}
// CHECK: [[NNARG1]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "tmpl", value: !"tmpl_impl")
-// CHECK: [[NNARG2]] = !DITemplateValueParameter(name: "lvr", type: [[INTLVR:![0-9]*]], value: i32* @glb)
+// CHECK: [[NNARG2]] = !DITemplateValueParameter(name: "lvr", type: [[INTLVR:![0-9]*]], value: ptr @glb)
// CHECK: [[INTLVR]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[INT]]
NN<tmpl_impl, glb> nn;
@@ -149,7 +149,7 @@ PaddingAtEnd PaddedObj = {};
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "PaddingAtEndTemplate<&PaddedObj>"
// CHECK-SAME: templateParams: [[PTOARGS:![0-9]*]]
// CHECK: [[PTOARGS]] = !{[[PTOARG1:![0-9]*]]}
-// CHECK: [[PTOARG1]] = !DITemplateValueParameter(type: [[CONST_PADDINGATEND_PTR:![0-9]*]], value: %struct.PaddingAtEnd* @PaddedObj)
+// CHECK: [[PTOARG1]] = !DITemplateValueParameter(type: [[CONST_PADDINGATEND_PTR:![0-9]*]], value: ptr @PaddedObj)
// CHECK: [[CONST_PADDINGATEND_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[PADDINGATEND]], size: 64)
template <PaddingAtEnd *>
struct PaddingAtEndTemplate {
@@ -178,7 +178,7 @@ ClassTemplateArgRefTemplate<ClassTemplateArgObj.Arg> ClassTemplateArgRefObj;
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ClassTemplateArgRefTemplate<<template param ClassTemplateArg{1, 2.000000e+00}> >", {{.*}}, templateParams: ![[CLASS_TEMP_REF_ARGS:[0-9]*]],
// CHECK: ![[CLASS_TEMP_REF_ARGS]] = !{![[CLASS_TEMP_REF_ARG:[0-9]*]]}
-// CHECK: ![[CLASS_TEMP_REF_ARG]] = !DITemplateValueParameter(type: ![[CLASS_TEMP_ARG_CONST_REF_TYPE]], value: %{{.*}}* @_ZTAXtl16ClassTemplateArgLi1ELf40000000EEE)
+// CHECK: ![[CLASS_TEMP_REF_ARG]] = !DITemplateValueParameter(type: ![[CLASS_TEMP_ARG_CONST_REF_TYPE]], value: ptr @_ZTAXtl16ClassTemplateArgLi1ELf40000000EEE)
inline namespace inl {
struct t1 { };
diff --git a/clang/test/CodeGenCXX/default-arg-temps.cpp b/clang/test/CodeGenCXX/default-arg-temps.cpp
index ebf73dcdd08d9..605407c17da68 100644
--- a/clang/test/CodeGenCXX/default-arg-temps.cpp
+++ b/clang/test/CodeGenCXX/default-arg-temps.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
struct T {
T();
@@ -15,14 +15,14 @@ class X { // ...
// CHECK-LABEL: define{{.*}} void @_Z1gv()
void g() {
- // CHECK: call void @_ZN1TC1Ev([[T:%.*]]* {{[^,]*}} [[AGG1:%.*]])
- // CHECK-NEXT: call void @_Z1fRK1T([[T]]* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AGG1]])
- // CHECK-NEXT: call void @_ZN1TD1Ev([[T]]* {{[^,]*}} [[AGG1]])
+ // CHECK: call void @_ZN1TC1Ev(ptr {{[^,]*}} [[AGG1:%.*]])
+ // CHECK-NEXT: call void @_Z1fRK1T(ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AGG1]])
+ // CHECK-NEXT: call void @_ZN1TD1Ev(ptr {{[^,]*}} [[AGG1]])
f();
- // CHECK-NEXT: call void @_ZN1TC1Ev([[T:%.*]]* {{[^,]*}} [[AGG2:%.*]])
- // CHECK-NEXT: call void @_Z1fRK1T([[T]]* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AGG2]])
- // CHECK-NEXT: call void @_ZN1TD1Ev([[T]]* {{[^,]*}} [[AGG2]])
+ // CHECK-NEXT: call void @_ZN1TC1Ev(ptr {{[^,]*}} [[AGG2:%.*]])
+ // CHECK-NEXT: call void @_Z1fRK1T(ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AGG2]])
+ // CHECK-NEXT: call void @_ZN1TD1Ev(ptr {{[^,]*}} [[AGG2]])
f();
// CHECK-NEXT: call void @_ZN1XC1Ev(
@@ -43,7 +43,7 @@ void g() {
class obj{ int a; float b; double d; };
// CHECK-LABEL: define{{.*}} void @_Z1hv()
void h() {
- // CHECK: call void @llvm.memset.p0i8.i64(
+ // CHECK: call void @llvm.memset.p0.i64(
obj o = obj();
}
@@ -61,7 +61,7 @@ namespace test1 {
C c;
A a;
- // CHECK-LABEL: define linkonce_odr void @_ZN5test11DC2Ev(%"struct.test1::D"* {{[^,]*}} %this) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test11DC2Ev(ptr {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN5test11BC1Ev(
// CHECK-NEXT: call void @_ZN5test11CC1ERKNS_1BE(
// CHECK-NEXT: call void @_ZN5test11BD1Ev(
diff --git a/clang/test/CodeGenCXX/derived-to-base-conv.cpp b/clang/test/CodeGenCXX/derived-to-base-conv.cpp
index c19c4a36a9430..9025f6655eb39 100644
--- a/clang/test/CodeGenCXX/derived-to-base-conv.cpp
+++ b/clang/test/CodeGenCXX/derived-to-base-conv.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | FileCheck %s
struct A {
A(const A&);
@@ -33,11 +33,10 @@ void test0(X x) {
test0_helper(x);
// CHECK-LABEL: define{{.*}} void @_Z5test01X(
// CHECK: [[TMP:%.*]] = alloca [[A:%.*]], align
- // CHECK-NEXT: [[T0:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[B:%.*]]* @_ZN1XcvR1BEv(
- // CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]* [[T0]] to [[A]]*
- // CHECK-NEXT: call void @_ZN1AC1ERKS_([[A]]* {{[^,]*}} [[TMP]], [[A]]* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[T1]])
- // CHECK-NEXT: call void @_Z12test0_helper1A([[A]]* noundef [[TMP]])
- // CHECK-NEXT: call void @_ZN1AD1Ev([[A]]* {{[^,]*}} [[TMP]])
+ // CHECK-NEXT: [[T0:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1XcvR1BEv(
+ // CHECK-NEXT: call void @_ZN1AC1ERKS_(ptr {{[^,]*}} [[TMP]], ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[T0]])
+ // CHECK-NEXT: call void @_Z12test0_helper1A(ptr noundef [[TMP]])
+ // CHECK-NEXT: call void @_ZN1AD1Ev(ptr {{[^,]*}} [[TMP]])
// CHECK-NEXT: ret void
}
@@ -76,11 +75,10 @@ class Test2b final : public virtual Test2a {};
void test2(Test2b &x) {
Test2a &y = x;
// CHECK-LABEL: define{{.*}} void @_Z5test2R6Test2b(
- // CHECK: [[X:%.*]] = alloca [[B:%.*]]*, align 8
- // CHECK-NEXT: [[Y:%.*]] = alloca [[A:%.*]]*, align 8
- // CHECK-NEXT: store [[B]]* {{%.*}}, [[B]]** [[X]], align 8
- // CHECK-NEXT: [[T0:%.*]] = load [[B]]*, [[B]]** [[X]], align 8
- // CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]* [[T0]] to [[A]]*
- // CHECK-NEXT: store [[A]]* [[T1]], [[A]]** [[Y]], align 8
+ // CHECK: [[X:%.*]] = alloca ptr, align 8
+ // CHECK-NEXT: [[Y:%.*]] = alloca ptr, align 8
+ // CHECK-NEXT: store ptr {{%.*}}, ptr [[X]], align 8
+ // CHECK-NEXT: [[T0:%.*]] = load ptr, ptr [[X]], align 8
+ // CHECK-NEXT: store ptr [[T0]], ptr [[Y]], align 8
// CHECK-NEXT: ret void
}
diff --git a/clang/test/CodeGenCXX/ext-int.cpp b/clang/test/CodeGenCXX/ext-int.cpp
index 659722f15d77a..aeb2c9a7022bc 100644
--- a/clang/test/CodeGenCXX/ext-int.cpp
+++ b/clang/test/CodeGenCXX/ext-int.cpp
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN64,NoNewStructPathTBAA
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-gnu-linux -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN64,NewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN64,NoNewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-gnu-linux -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN64,NewStructPathTBAA
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN64,NoNewStructPathTBAA
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-pc -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN64,NewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN64,NoNewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-pc -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN64,NewStructPathTBAA
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN32,NoNewStructPathTBAA
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-gnu-linux -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN32,NewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN32,NoNewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-gnu-linux -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LIN,LIN32,NewStructPathTBAA
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN32,NoNewStructPathTBAA
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-windows-pc -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN32,NewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN32,NoNewStructPathTBAA
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-windows-pc -O3 -disable-llvm-passes -I%S -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WIN,WIN32,NewStructPathTBAA
namespace std {
class type_info { public: virtual ~type_info(); private: const char * name; };
@@ -87,17 +87,13 @@ void BitfieldAssignment() {
B.B = 2;
B.C = 1;
// First one is used for the lifetime start, skip that.
- // CHECK: bitcast %struct.BitFieldsByte*
- // CHECK: %[[BFType:.+]] = bitcast %struct.BitFieldsByte*
- // CHECK: %[[LOADA:.+]] = load i8, i8* %[[BFType]]
+ // CHECK: %[[LOADA:.+]] = load i8, ptr %[[BFType:.*]]
// CHECK: %[[CLEARA:.+]] = and i8 %[[LOADA]], -8
// CHECK: %[[SETA:.+]] = or i8 %[[CLEARA]], 3
- // CHECK: %[[BFType:.+]] = bitcast %struct.BitFieldsByte*
- // CHECK: %[[LOADB:.+]] = load i8, i8* %[[BFType]]
+ // CHECK: %[[LOADB:.+]] = load i8, ptr %[[BFType:.*]]
// CHECK: %[[CLEARB:.+]] = and i8 %[[LOADB]], -57
// CHECK: %[[SETB:.+]] = or i8 %[[CLEARB]], 16
- // CHECK: %[[BFType:.+]] = bitcast %struct.BitFieldsByte*
- // CHECK: %[[LOADC:.+]] = load i8, i8* %[[BFType]]
+ // CHECK: %[[LOADC:.+]] = load i8, ptr %[[BFType:.*]]
// CHECK: %[[CLEARC:.+]] = and i8 %[[LOADC]], 63
// CHECK: %[[SETC:.+]] = or i8 %[[CLEARC]], 64
}
@@ -144,9 +140,9 @@ void ManglingInstantiator() {
// WIN: define dso_local void @"?ManglingInstantiator@@YAXXZ"()
_BitInt(93) A;
ManglingTestTemplateParam(A);
-// LIN: call void @_Z25ManglingTestTemplateParamIDB93_EvRT_(i93*
-// WIN64: call void @"??$ManglingTestTemplateParam at U?$_BitInt@$0FN@@__clang@@@@YAXAEAU?$_BitInt@$0FN@@__clang@@@Z"(i93*
-// WIN32: call void @"??$ManglingTestTemplateParam at U?$_BitInt@$0FN@@__clang@@@@YAXAAU?$_BitInt@$0FN@@__clang@@@Z"(i93*
+// LIN: call void @_Z25ManglingTestTemplateParamIDB93_EvRT_(ptr
+// WIN64: call void @"??$ManglingTestTemplateParam at U?$_BitInt@$0FN@@__clang@@@@YAXAEAU?$_BitInt@$0FN@@__clang@@@Z"(ptr
+// WIN32: call void @"??$ManglingTestTemplateParam at U?$_BitInt@$0FN@@__clang@@@@YAXAAU?$_BitInt@$0FN@@__clang@@@Z"(ptr
constexpr _BitInt(93) B = 993;
ManglingTestNTTP<38>();
// LIN: call void @_Z16ManglingTestNTTPILDB99_38EEvv()
@@ -160,9 +156,9 @@ void ManglingInstantiator() {
// WIN32: call signext i4 @"??$ManglingDependent@$03@@YAU?$_BitInt@$03 at __clang@@XZ"()
uint16_t4 V;
ManglingTestTemplateParam(V);
- // LIN: call void @_Z25ManglingTestTemplateParamIDv4_DU16_EvRT_(<4 x i16>*
- // WIN64: call void @"??$ManglingTestTemplateParam at T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@@YAXAEAT?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@Z"(<4 x i16>*
- // WIN32: call void @"??$ManglingTestTemplateParam at T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@@YAXAAT?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@Z"(<4 x i16>*
+ // LIN: call void @_Z25ManglingTestTemplateParamIDv4_DU16_EvRT_(ptr
+ // WIN64: call void @"??$ManglingTestTemplateParam at T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@@YAXAEAT?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@Z"(ptr
+ // WIN32: call void @"??$ManglingTestTemplateParam at T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@@YAXAAT?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@Z"(ptr
}
@@ -172,181 +168,158 @@ void TakesVarargs(int i, ...) {
__builtin_va_list args;
// LIN64: %[[ARGS:.+]] = alloca [1 x %struct.__va_list_tag]
- // LIN32: %[[ARGS:.+]] = alloca i8*
- // WIN: %[[ARGS:.+]] = alloca i8*
+ // LIN32: %[[ARGS:.+]] = alloca ptr
+ // WIN: %[[ARGS:.+]] = alloca ptr
__builtin_va_start(args, i);
- // LIN64: %[[STARTAD:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %[[ARGS]]
- // LIN64: %[[STARTAD1:.+]] = bitcast %struct.__va_list_tag* %[[STARTAD]] to i8*
- // LIN64: call void @llvm.va_start(i8* %[[STARTAD1]])
- // LIN32: %[[ARGSLLIFETIMESTART:.+]] = bitcast i8** %[[ARGS]] to i8*
- // LIN32: %[[ARGSSTART:.+]] = bitcast i8** %[[ARGS]] to i8*
- // LIN32: call void @llvm.va_start(i8* %[[ARGSSTART]])
- // WIN: %[[ARGSLLIFETIMESTART:.+]] = bitcast i8** %[[ARGS]] to i8*
- // WIN: %[[ARGSSTART:.+]] = bitcast i8** %[[ARGS]] to i8*
- // WIN: call void @llvm.va_start(i8* %[[ARGSSTART]])
+ // LIN64: %[[STARTAD:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %[[ARGS]]
+ // LIN64: call void @llvm.va_start(ptr %[[STARTAD]])
+ // LIN32: call void @llvm.va_start(ptr %[[ARGS]])
+ // WIN: call void @llvm.va_start(ptr %[[ARGS]])
_BitInt(92) A = __builtin_va_arg(args, _BitInt(92));
- // LIN64: %[[AD1:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %[[ARGS]]
- // LIN64: %[[OFA_P1:.+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %[[AD1]], i32 0, i32 0
- // LIN64: %[[GPOFFSET:.+]] = load i32, i32* %[[OFA_P1]]
+ // LIN64: %[[AD1:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %[[ARGS]]
+ // LIN64: %[[OFA_P1:.+]] = getelementptr inbounds %struct.__va_list_tag, ptr %[[AD1]], i32 0, i32 0
+ // LIN64: %[[GPOFFSET:.+]] = load i32, ptr %[[OFA_P1]]
// LIN64: %[[FITSINGP:.+]] = icmp ule i32 %[[GPOFFSET]], 32
// LIN64: br i1 %[[FITSINGP]]
- // LIN64: %[[BC1:.+]] = phi i92*
- // LIN64: %[[LOAD1:.+]] = load i92, i92* %[[BC1]]
- // LIN64: store i92 %[[LOAD1]], i92*
-
- // LIN32: %[[CUR1:.+]] = load i8*, i8** %[[ARGS]]
- // LIN32: %[[NEXT1:.+]] = getelementptr inbounds i8, i8* %[[CUR1]], i32 12
- // LIN32: store i8* %[[NEXT1]], i8** %[[ARGS]]
- // LIN32: %[[BC1:.+]] = bitcast i8* %[[CUR1]] to i92*
- // LIN32: %[[LOADV1:.+]] = load i92, i92* %[[BC1]]
- // LIN32: store i92 %[[LOADV1]], i92*
-
- // WIN64: %[[CUR1:.+]] = load i8*, i8** %[[ARGS]]
- // WIN64: %[[NEXT1:.+]] = getelementptr inbounds i8, i8* %[[CUR1]], i64 8
- // WIN64: store i8* %[[NEXT1]], i8** %[[ARGS]]
- // WIN64: %[[BC1:.+]] = bitcast i8* %[[CUR1]] to i92**
- // WIN64: %[[LOADP1:.+]] = load i92*, i92** %[[BC1]]
- // WIN64: %[[LOADV1:.+]] = load i92, i92* %[[LOADP1]]
- // WIN64: store i92 %[[LOADV1]], i92*
-
- // WIN32: %[[CUR1:.+]] = load i8*, i8** %[[ARGS]]
- // WIN32: %[[NEXT1:.+]] = getelementptr inbounds i8, i8* %[[CUR1]], i32 16
- // WIN32: store i8* %[[NEXT1]], i8** %[[ARGS]]
- // WIN32: %[[BC1:.+]] = bitcast i8* %[[CUR1]] to i92*
- // WIN32: %[[LOADV1:.+]] = load i92, i92* %[[BC1]]
- // WIN32: store i92 %[[LOADV1]], i92*
+ // LIN64: %[[BC1:.+]] = phi ptr
+ // LIN64: %[[LOAD1:.+]] = load i92, ptr %[[BC1]]
+ // LIN64: store i92 %[[LOAD1]], ptr
+
+ // LIN32: %[[CUR1:.+]] = load ptr, ptr %[[ARGS]]
+ // LIN32: %[[NEXT1:.+]] = getelementptr inbounds i8, ptr %[[CUR1]], i32 12
+ // LIN32: store ptr %[[NEXT1]], ptr %[[ARGS]]
+ // LIN32: %[[LOADV1:.+]] = load i92, ptr %[[CUR1]]
+ // LIN32: store i92 %[[LOADV1]], ptr
+
+ // WIN64: %[[CUR1:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN64: %[[NEXT1:.+]] = getelementptr inbounds i8, ptr %[[CUR1]], i64 8
+ // WIN64: store ptr %[[NEXT1]], ptr %[[ARGS]]
+ // WIN64: %[[LOADP1:.+]] = load ptr, ptr %[[CUR1]]
+ // WIN64: %[[LOADV1:.+]] = load i92, ptr %[[LOADP1]]
+ // WIN64: store i92 %[[LOADV1]], ptr
+
+ // WIN32: %[[CUR1:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN32: %[[NEXT1:.+]] = getelementptr inbounds i8, ptr %[[CUR1]], i32 16
+ // WIN32: store ptr %[[NEXT1]], ptr %[[ARGS]]
+ // WIN32: %[[LOADV1:.+]] = load i92, ptr %[[CUR1]]
+ // WIN32: store i92 %[[LOADV1]], ptr
_BitInt(31) B = __builtin_va_arg(args, _BitInt(31));
- // LIN64: %[[AD2:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %[[ARGS]]
- // LIN64: %[[OFA_P2:.+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %[[AD2]], i32 0, i32 0
- // LIN64: %[[GPOFFSET:.+]] = load i32, i32* %[[OFA_P2]]
+ // LIN64: %[[AD2:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %[[ARGS]]
+ // LIN64: %[[OFA_P2:.+]] = getelementptr inbounds %struct.__va_list_tag, ptr %[[AD2]], i32 0, i32 0
+ // LIN64: %[[GPOFFSET:.+]] = load i32, ptr %[[OFA_P2]]
// LIN64: %[[FITSINGP:.+]] = icmp ule i32 %[[GPOFFSET]], 40
// LIN64: br i1 %[[FITSINGP]]
- // LIN64: %[[BC1:.+]] = phi i31*
- // LIN64: %[[LOAD1:.+]] = load i31, i31* %[[BC1]]
- // LIN64: store i31 %[[LOAD1]], i31*
-
- // LIN32: %[[CUR2:.+]] = load i8*, i8** %[[ARGS]]
- // LIN32: %[[NEXT2:.+]] = getelementptr inbounds i8, i8* %[[CUR2]], i32 4
- // LIN32: store i8* %[[NEXT2]], i8** %[[ARGS]]
- // LIN32: %[[BC2:.+]] = bitcast i8* %[[CUR2]] to i31*
- // LIN32: %[[LOADV2:.+]] = load i31, i31* %[[BC2]]
- // LIN32: store i31 %[[LOADV2]], i31*
-
- // WIN64: %[[CUR2:.+]] = load i8*, i8** %[[ARGS]]
- // WIN64: %[[NEXT2:.+]] = getelementptr inbounds i8, i8* %[[CUR2]], i64 8
- // WIN64: store i8* %[[NEXT2]], i8** %[[ARGS]]
- // WIN64: %[[BC2:.+]] = bitcast i8* %[[CUR2]] to i31*
- // WIN64: %[[LOADV2:.+]] = load i31, i31* %[[BC2]]
- // WIN64: store i31 %[[LOADV2]], i31*
-
- // WIN32: %[[CUR2:.+]] = load i8*, i8** %[[ARGS]]
- // WIN32: %[[NEXT2:.+]] = getelementptr inbounds i8, i8* %[[CUR2]], i32 4
- // WIN32: store i8* %[[NEXT2]], i8** %[[ARGS]]
- // WIN32: %[[BC2:.+]] = bitcast i8* %[[CUR2]] to i31*
- // WIN32: %[[LOADV2:.+]] = load i31, i31* %[[BC2]]
- // WIN32: store i31 %[[LOADV2]], i31*
+ // LIN64: %[[BC1:.+]] = phi ptr
+ // LIN64: %[[LOAD1:.+]] = load i31, ptr %[[BC1]]
+ // LIN64: store i31 %[[LOAD1]], ptr
+
+ // LIN32: %[[CUR2:.+]] = load ptr, ptr %[[ARGS]]
+ // LIN32: %[[NEXT2:.+]] = getelementptr inbounds i8, ptr %[[CUR2]], i32 4
+ // LIN32: store ptr %[[NEXT2]], ptr %[[ARGS]]
+ // LIN32: %[[LOADV2:.+]] = load i31, ptr %[[CUR2]]
+ // LIN32: store i31 %[[LOADV2]], ptr
+
+ // WIN64: %[[CUR2:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN64: %[[NEXT2:.+]] = getelementptr inbounds i8, ptr %[[CUR2]], i64 8
+ // WIN64: store ptr %[[NEXT2]], ptr %[[ARGS]]
+ // WIN64: %[[LOADV2:.+]] = load i31, ptr %[[CUR2]]
+ // WIN64: store i31 %[[LOADV2]], ptr
+
+ // WIN32: %[[CUR2:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN32: %[[NEXT2:.+]] = getelementptr inbounds i8, ptr %[[CUR2]], i32 4
+ // WIN32: store ptr %[[NEXT2]], ptr %[[ARGS]]
+ // WIN32: %[[LOADV2:.+]] = load i31, ptr %[[CUR2]]
+ // WIN32: store i31 %[[LOADV2]], ptr
_BitInt(16) C = __builtin_va_arg(args, _BitInt(16));
- // LIN64: %[[AD3:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %[[ARGS]]
- // LIN64: %[[OFA_P3:.+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %[[AD3]], i32 0, i32 0
- // LIN64: %[[GPOFFSET:.+]] = load i32, i32* %[[OFA_P3]]
+ // LIN64: %[[AD3:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %[[ARGS]]
+ // LIN64: %[[OFA_P3:.+]] = getelementptr inbounds %struct.__va_list_tag, ptr %[[AD3]], i32 0, i32 0
+ // LIN64: %[[GPOFFSET:.+]] = load i32, ptr %[[OFA_P3]]
// LIN64: %[[FITSINGP:.+]] = icmp ule i32 %[[GPOFFSET]], 40
// LIN64: br i1 %[[FITSINGP]]
- // LIN64: %[[BC1:.+]] = phi i16*
- // LIN64: %[[LOAD1:.+]] = load i16, i16* %[[BC1]]
- // LIN64: store i16 %[[LOAD1]], i16*
-
- // LIN32: %[[CUR3:.+]] = load i8*, i8** %[[ARGS]]
- // LIN32: %[[NEXT3:.+]] = getelementptr inbounds i8, i8* %[[CUR3]], i32 4
- // LIN32: store i8* %[[NEXT3]], i8** %[[ARGS]]
- // LIN32: %[[BC3:.+]] = bitcast i8* %[[CUR3]] to i16*
- // LIN32: %[[LOADV3:.+]] = load i16, i16* %[[BC3]]
- // LIN32: store i16 %[[LOADV3]], i16*
-
- // WIN64: %[[CUR3:.+]] = load i8*, i8** %[[ARGS]]
- // WIN64: %[[NEXT3:.+]] = getelementptr inbounds i8, i8* %[[CUR3]], i64 8
- // WIN64: store i8* %[[NEXT3]], i8** %[[ARGS]]
- // WIN64: %[[BC3:.+]] = bitcast i8* %[[CUR3]] to i16*
- // WIN64: %[[LOADV3:.+]] = load i16, i16* %[[BC3]]
- // WIN64: store i16 %[[LOADV3]], i16*
-
- // WIN32: %[[CUR3:.+]] = load i8*, i8** %[[ARGS]]
- // WIN32: %[[NEXT3:.+]] = getelementptr inbounds i8, i8* %[[CUR3]], i32 4
- // WIN32: store i8* %[[NEXT3]], i8** %[[ARGS]]
- // WIN32: %[[BC3:.+]] = bitcast i8* %[[CUR3]] to i16*
- // WIN32: %[[LOADV3:.+]] = load i16, i16* %[[BC3]]
- // WIN32: store i16 %[[LOADV3]], i16*
+ // LIN64: %[[BC1:.+]] = phi ptr
+ // LIN64: %[[LOAD1:.+]] = load i16, ptr %[[BC1]]
+ // LIN64: store i16 %[[LOAD1]], ptr
+
+ // LIN32: %[[CUR3:.+]] = load ptr, ptr %[[ARGS]]
+ // LIN32: %[[NEXT3:.+]] = getelementptr inbounds i8, ptr %[[CUR3]], i32 4
+ // LIN32: store ptr %[[NEXT3]], ptr %[[ARGS]]
+ // LIN32: %[[LOADV3:.+]] = load i16, ptr %[[CUR3]]
+ // LIN32: store i16 %[[LOADV3]], ptr
+
+ // WIN64: %[[CUR3:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN64: %[[NEXT3:.+]] = getelementptr inbounds i8, ptr %[[CUR3]], i64 8
+ // WIN64: store ptr %[[NEXT3]], ptr %[[ARGS]]
+ // WIN64: %[[LOADV3:.+]] = load i16, ptr %[[CUR3]]
+ // WIN64: store i16 %[[LOADV3]], ptr
+
+ // WIN32: %[[CUR3:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN32: %[[NEXT3:.+]] = getelementptr inbounds i8, ptr %[[CUR3]], i32 4
+ // WIN32: store ptr %[[NEXT3]], ptr %[[ARGS]]
+ // WIN32: %[[LOADV3:.+]] = load i16, ptr %[[CUR3]]
+ // WIN32: store i16 %[[LOADV3]], ptr
uint16_t4 D = __builtin_va_arg(args, uint16_t4);
- // LIN64: %[[AD4:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %[[ARGS]]
- // LIN64: %[[OFA_P4:.+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %[[AD4]], i32 0, i32 1
- // LIN64: %[[GPOFFSET:.+]] = load i32, i32* %[[OFA_P4]]
+ // LIN64: %[[AD4:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %[[ARGS]]
+ // LIN64: %[[OFA_P4:.+]] = getelementptr inbounds %struct.__va_list_tag, ptr %[[AD4]], i32 0, i32 1
+ // LIN64: %[[GPOFFSET:.+]] = load i32, ptr %[[OFA_P4]]
// LIN64: %[[FITSINGP:.+]] = icmp ule i32 %[[GPOFFSET]], 160
// LIN64: br i1 %[[FITSINGP]]
- // LIN64: %[[BC4:.+]] = phi <4 x i16>*
- // LIN64: %[[LOADV4:.+]] = load <4 x i16>, <4 x i16>* %[[BC4]]
- // LIN64: store <4 x i16> %[[LOADV4]], <4 x i16>*
-
- // LIN32: %[[CUR4:.+]] = load i8*, i8** %[[ARGS]]
- // LIN32: %[[NEXT4:.+]] = getelementptr inbounds i8, i8* %[[CUR4]], i32 8
- // LIN32: store i8* %[[NEXT4]], i8** %[[ARGS]]
- // LIN32: %[[BC4:.+]] = bitcast i8* %[[CUR4]] to <4 x i16>*
- // LIN32: %[[LOADV4:.+]] = load <4 x i16>, <4 x i16>* %[[BC4]]
- // LIN32: store <4 x i16> %[[LOADV4]], <4 x i16>* %
-
- // WIN: %[[CUR4:.+]] = load i8*, i8** %[[ARGS]]
- // WIN64: %[[NEXT4:.+]] = getelementptr inbounds i8, i8* %[[CUR4]], i64 8
- // WIN32: %[[NEXT4:.+]] = getelementptr inbounds i8, i8* %[[CUR4]], i32 8
- // WIN: store i8* %[[NEXT4]], i8** %[[ARGS]]
- // WIN: %[[BC4:.+]] = bitcast i8* %[[CUR4]] to <4 x i16>*
- // WIN: %[[LOADV4:.+]] = load <4 x i16>, <4 x i16>* %[[BC4]]
- // WIN: store <4 x i16> %[[LOADV4]], <4 x i16>*
+ // LIN64: %[[BC4:.+]] = phi ptr
+ // LIN64: %[[LOADV4:.+]] = load <4 x i16>, ptr %[[BC4]]
+ // LIN64: store <4 x i16> %[[LOADV4]], ptr
+
+ // LIN32: %[[CUR4:.+]] = load ptr, ptr %[[ARGS]]
+ // LIN32: %[[NEXT4:.+]] = getelementptr inbounds i8, ptr %[[CUR4]], i32 8
+ // LIN32: store ptr %[[NEXT4]], ptr %[[ARGS]]
+ // LIN32: %[[LOADV4:.+]] = load <4 x i16>, ptr %[[CUR4]]
+ // LIN32: store <4 x i16> %[[LOADV4]], ptr %
+
+ // WIN: %[[CUR4:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN64: %[[NEXT4:.+]] = getelementptr inbounds i8, ptr %[[CUR4]], i64 8
+ // WIN32: %[[NEXT4:.+]] = getelementptr inbounds i8, ptr %[[CUR4]], i32 8
+ // WIN: store ptr %[[NEXT4]], ptr %[[ARGS]]
+ // WIN: %[[LOADV4:.+]] = load <4 x i16>, ptr %[[CUR4]]
+ // WIN: store <4 x i16> %[[LOADV4]], ptr
vint32_t8 E = __builtin_va_arg(args, vint32_t8);
- // LIN64: %[[AD5:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %[[ARGS]]
- // LIN64: %[[OFAA_P4:.+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %[[AD5]], i32 0, i32 2
- // LIN64: %[[OFAA:.+]] = load i8*, i8** %[[OFAA_P4]]
- // LIN64: %[[TOINT:.+]] = ptrtoint i8* %[[OFAA]] to i64
+ // LIN64: %[[AD5:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %[[ARGS]]
+ // LIN64: %[[OFAA_P4:.+]] = getelementptr inbounds %struct.__va_list_tag, ptr %[[AD5]], i32 0, i32 2
+ // LIN64: %[[OFAA:.+]] = load ptr, ptr %[[OFAA_P4]]
+ // LIN64: %[[TOINT:.+]] = ptrtoint ptr %[[OFAA]] to i64
// LIN64: %[[ADD:.+]] = add i64 %[[TOINT]], 31
// LIN64: %[[AND:.+]] = and i64 %[[ADD]], -32
- // LIN64: %[[OFAA_ALIGNED:.+]] = inttoptr i64 %[[AND]] to i8*
- // LIN64: %[[BC5:.+]] = bitcast i8* %[[OFAA_ALIGNED]] to <8 x i32>*
- // LIN64: %[[LOADV5:.+]] = load <8 x i32>, <8 x i32>* %[[BC5]]
- // LIN64: store <8 x i32> %[[LOADV5]], <8 x i32>*
+ // LIN64: %[[OFAA_ALIGNED:.+]] = inttoptr i64 %[[AND]] to ptr
+ // LIN64: %[[LOADV5:.+]] = load <8 x i32>, ptr %[[OFAA_ALIGNED]]
+ // LIN64: store <8 x i32> %[[LOADV5]], ptr
- // LIN32: %[[CUR5:.+]] = load i8*, i8** %[[ARGS]]
- // LIN32: %[[TOINT:.+]] = ptrtoint i8* %[[CUR5]] to i32
+ // LIN32: %[[CUR5:.+]] = load ptr, ptr %[[ARGS]]
+ // LIN32: %[[TOINT:.+]] = ptrtoint ptr %[[CUR5]] to i32
// LIN32: %[[ADD:.+]] = add i32 %[[TOINT]], 31
// LIN32: %[[AND:.+]] = and i32 %[[ADD]], -32
- // LIN32: %[[CUR5_ALIGNED:.+]] = inttoptr i32 %[[AND]] to i8*
- // LIN32: %[[NEXT5:.+]] = getelementptr inbounds i8, i8* %[[CUR5_ALIGNED]], i32 32
- // LIN32: store i8* %[[NEXT5]], i8** %[[ARGS]]
- // LIN32: %[[LOADP5:.+]] = bitcast i8* %[[CUR5_ALIGNED]] to <8 x i32>*
- // LIN32: %[[LOADV5:.+]] = load <8 x i32>, <8 x i32>* %[[LOADP5]]
- // LIN32: store <8 x i32> %[[LOADV5]], <8 x i32>*
-
- // WIN: %[[CUR5:.+]] = load i8*, i8** %[[ARGS]]
- // WIN64: %[[NEXT5:.+]] = getelementptr inbounds i8, i8* %[[CUR5]], i64 8
- // WIN32: %[[NEXT5:.+]] = getelementptr inbounds i8, i8* %[[CUR5]], i32 32
- // WIN: store i8* %[[NEXT5]], i8** %[[ARGS]]
- // WIN64: %[[BC5:.+]] = bitcast i8* %[[CUR5]] to <8 x i32>**
- // WIN64: %[[LOADP5:.+]] = load <8 x i32>*, <8 x i32>** %[[BC5]]
- // WIN64: %[[LOADV5:.+]] = load <8 x i32>, <8 x i32>* %[[LOADP5]]
- // WIN32: %[[BC5:.+]] = bitcast i8* %argp.cur8 to <8 x i32>*
- // WIN32: %[[LOADV5:.+]] = load <8 x i32>, <8 x i32>* %[[BC5]]
- // WIN: store <8 x i32> %[[LOADV5]], <8 x i32>*
+ // LIN32: %[[CUR5_ALIGNED:.+]] = inttoptr i32 %[[AND]] to ptr
+ // LIN32: %[[NEXT5:.+]] = getelementptr inbounds i8, ptr %[[CUR5_ALIGNED]], i32 32
+ // LIN32: store ptr %[[NEXT5]], ptr %[[ARGS]]
+ // LIN32: %[[LOADV5:.+]] = load <8 x i32>, ptr %[[CUR5_ALIGNED]]
+ // LIN32: store <8 x i32> %[[LOADV5]], ptr
+
+ // WIN: %[[CUR5:.+]] = load ptr, ptr %[[ARGS]]
+ // WIN64: %[[NEXT5:.+]] = getelementptr inbounds i8, ptr %[[CUR5]], i64 8
+ // WIN32: %[[NEXT5:.+]] = getelementptr inbounds i8, ptr %[[CUR5]], i32 32
+ // WIN: store ptr %[[NEXT5]], ptr %[[ARGS]]
+ // WIN64: %[[LOADP5:.+]] = load ptr, ptr %[[CUR5]]
+ // WIN64: %[[LOADV5:.+]] = load <8 x i32>, ptr %[[LOADP5]]
+ // WIN32: %[[LOADV5:.+]] = load <8 x i32>, ptr %argp.cur7
+ // WIN: store <8 x i32> %[[LOADV5]], ptr
__builtin_va_end(args);
- // LIN64: %[[ENDAD:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %[[ARGS]]
- // LIN64: %[[ENDAD1:.+]] = bitcast %struct.__va_list_tag* %[[ENDAD]] to i8*
- // LIN64: call void @llvm.va_end(i8* %[[ENDAD1]])
- // LIN32: %[[ARGSEND:.+]] = bitcast i8** %[[ARGS]] to i8*
- // LIN32: call void @llvm.va_end(i8* %[[ARGSEND]])
- // WIN: %[[ARGSEND:.+]] = bitcast i8** %[[ARGS]] to i8*
- // WIN: call void @llvm.va_end(i8* %[[ARGSEND]])
+ // LIN64: %[[ENDAD:.+]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %[[ARGS]]
+ // LIN64: call void @llvm.va_end(ptr %[[ENDAD]])
+ // LIN32: call void @llvm.va_end(ptr %[[ARGS]])
+ // WIN: call void @llvm.va_end(ptr %[[ARGS]])
}
void typeid_tests() {
// LIN: define{{.*}} void @_Z12typeid_testsv()
@@ -356,45 +329,45 @@ void typeid_tests() {
_BitInt(32) S32_1, S32_2;
auto A = typeid(U33_1);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDU33_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDU33_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor28* @"??_R0U?$_UBitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor28* @"??_R0U?$_UBitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDU33_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDU33_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0U?$_UBitInt@$0CB@@__clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0U?$_UBitInt@$0CB@@__clang@@@8")
auto B = typeid(U33_2);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDU33_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDU33_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor28* @"??_R0U?$_UBitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor28* @"??_R0U?$_UBitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDU33_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDU33_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0U?$_UBitInt@$0CB@@__clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0U?$_UBitInt@$0CB@@__clang@@@8")
auto C = typeid(S33_1);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDB33_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDB33_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDB33_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDB33_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0U?$_BitInt@$0CB@@__clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0U?$_BitInt@$0CB@@__clang@@@8")
auto D = typeid(S33_2);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDB33_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDB33_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CB@@__clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDB33_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDB33_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0U?$_BitInt@$0CB@@__clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0U?$_BitInt@$0CB@@__clang@@@8")
auto E = typeid(S32_1);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDB32_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDB32_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CA@@__clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CA@@__clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDB32_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDB32_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0U?$_BitInt@$0CA@@__clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0U?$_BitInt@$0CA@@__clang@@@8")
auto F = typeid(S32_2);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDB32_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDB32_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CA@@__clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor27* @"??_R0U?$_BitInt@$0CA@@__clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDB32_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDB32_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0U?$_BitInt@$0CA@@__clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0U?$_BitInt@$0CA@@__clang@@@8")
auto G = typeid(uint16_t4);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDv4_DU16_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDv4_DU16_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor53* @"??_R0T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor53* @"??_R0T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDv4_DU16_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDv4_DU16_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0T?$__vector at U?$_UBitInt@$0BA@@__clang@@$03 at __clang@@@8")
auto H = typeid(vint32_t8);
- // LIN64: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast ({ i8*, i8* }* @_ZTIDv8_DB32_ to %"class.std::type_info"*))
- // LIN32: call void @_ZNSt9type_infoC1ERKS_(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast ({ i8*, i8* }* @_ZTIDv8_DB32_ to %"class.std::type_info"*))
- // WIN64: call %"class.std::type_info"* @"??0type_info at std@@QEAA at AEBV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 8 dereferenceable(16) bitcast (%rtti.TypeDescriptor54* @"??_R0?AT?$__vector at U?$_BitInt@$0CA@@__clang@@$07 at __clang@@@8" to %"class.std::type_info"*))
- // WIN32: call x86_thiscallcc %"class.std::type_info"* @"??0type_info at std@@QAE at ABV01@@Z"(%"class.std::type_info"* {{[^,]*}} %{{.+}}, %"class.std::type_info"* nonnull align 4 dereferenceable(8) bitcast (%rtti.TypeDescriptor54* @"??_R0?AT?$__vector at U?$_BitInt@$0CA@@__clang@@$07 at __clang@@@8" to %"class.std::type_info"*))
+ // LIN64: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @_ZTIDv8_DB32_)
+ // LIN32: call void @_ZNSt9type_infoC1ERKS_(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @_ZTIDv8_DB32_)
+ // WIN64: call ptr @"??0type_info at std@@QEAA at AEBV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 8 dereferenceable(16) @"??_R0?AT?$__vector at U?$_BitInt@$0CA@@__clang@@$07 at __clang@@@8")
+ // WIN32: call x86_thiscallcc ptr @"??0type_info at std@@QAE at ABV01@@Z"(ptr {{[^,]*}} %{{.+}}, ptr nonnull align 4 dereferenceable(8) @"??_R0?AT?$__vector at U?$_BitInt@$0CA@@__clang@@$07 at __clang@@@8")
}
void ExplicitCasts() {
@@ -433,23 +406,23 @@ void OffsetOfTest() {
// WIN: define dso_local void @"?OffsetOfTest@@YAXXZ"()
auto A = __builtin_offsetof(S,A);
- // CHECK: store i{{.+}} 0, i{{.+}}* %{{.+}}
+ // CHECK: store i{{.+}} 0, ptr %{{.+}}
auto B = __builtin_offsetof(S,B);
- // LIN64: store i{{.+}} 8, i{{.+}}* %{{.+}}
- // LIN32: store i{{.+}} 4, i{{.+}}* %{{.+}}
- // WIN: store i{{.+}} 8, i{{.+}}* %{{.+}}
+ // LIN64: store i{{.+}} 8, ptr %{{.+}}
+ // LIN32: store i{{.+}} 4, ptr %{{.+}}
+ // WIN: store i{{.+}} 8, ptr %{{.+}}
auto C = __builtin_offsetof(S,C);
- // LIN64: store i{{.+}} 24, i{{.+}}* %{{.+}}
- // LIN32: store i{{.+}} 20, i{{.+}}* %{{.+}}
- // WIN: store i{{.+}} 24, i{{.+}}* %{{.+}}
+ // LIN64: store i{{.+}} 24, ptr %{{.+}}
+ // LIN32: store i{{.+}} 20, ptr %{{.+}}
+ // WIN: store i{{.+}} 24, ptr %{{.+}}
auto D = __builtin_offsetof(S,D);
- // LIN64: store i64 32, i64* %{{.+}}
- // LIN32: store i32 24, i32* %{{.+}}
- // WIN: store i{{.+}} 32, i{{.+}}* %{{.+}}
+ // LIN64: store i64 32, ptr %{{.+}}
+ // LIN32: store i32 24, ptr %{{.+}}
+ // WIN: store i{{.+}} 32, ptr %{{.+}}
auto E = __builtin_offsetof(S,E);
- // LIN64: store i64 64, i64* %{{.+}}
- // LIN32: store i32 32, i32* %{{.+}}
- // WIN: store i{{.+}} 64, i{{.+}}* %{{.+}}
+ // LIN64: store i64 64, ptr %{{.+}}
+ // LIN32: store i32 32, ptr %{{.+}}
+ // WIN: store i{{.+}} 64, ptr %{{.+}}
}
@@ -491,7 +464,7 @@ void ShiftBitIntByConstant(uint16_t4 Ext) {
// CHECK: lshr <4 x i16> %{{.+}}, <i16 29, i16 29, i16 29, i16 29>
}
void ShiftBitIntByConstant(vint32_t8 Ext) {
-// LIN64: define{{.*}} void @_Z21ShiftBitIntByConstantDv8_DB32_(<8 x i32>* byval(<8 x i32>) align 32 %
+// LIN64: define{{.*}} void @_Z21ShiftBitIntByConstantDv8_DB32_(ptr byval(<8 x i32>) align 32 %
// LIN32: define dso_local void @_Z21ShiftBitIntByConstantDv8_DB32_(<8 x i32> %
// WIN: define dso_local void @"?ShiftBitIntByConstant@@YAXT?$__vector at U?$_BitInt@$0CA@@__clang@@$07 at __clang@@@Z"(<8 x i32>
Ext << 7;
@@ -577,16 +550,16 @@ void ComplexTest(_Complex _BitInt(12) first, _Complex _BitInt(33) second) {
// LIN: define{{.*}} void @_Z11ComplexTestCDB12_CDB33_
// WIN: define dso_local void @"?ComplexTest@@YAXU?$_Complex at U?$_BitInt@$0M@@__clang@@@__clang@@U?$_Complex at U?$_BitInt@$0CB@@__clang@@@2@@Z"
first + second;
- // CHECK: %[[FIRST_REALP:.+]] = getelementptr inbounds { i12, i12 }, { i12, i12 }* %{{.+}}, i32 0, i32 0
- // CHECK: %[[FIRST_REAL:.+]] = load i12, i12* %[[FIRST_REALP]]
- // CHECK: %[[FIRST_IMAGP:.+]] = getelementptr inbounds { i12, i12 }, { i12, i12 }* %{{.+}}, i32 0, i32 1
- // CHECK: %[[FIRST_IMAG:.+]] = load i12, i12* %[[FIRST_IMAGP]]
+ // CHECK: %[[FIRST_REALP:.+]] = getelementptr inbounds { i12, i12 }, ptr %{{.+}}, i32 0, i32 0
+ // CHECK: %[[FIRST_REAL:.+]] = load i12, ptr %[[FIRST_REALP]]
+ // CHECK: %[[FIRST_IMAGP:.+]] = getelementptr inbounds { i12, i12 }, ptr %{{.+}}, i32 0, i32 1
+ // CHECK: %[[FIRST_IMAG:.+]] = load i12, ptr %[[FIRST_IMAGP]]
// CHECK: %[[FIRST_REAL_CONV:.+]] = sext i12 %[[FIRST_REAL]]
// CHECK: %[[FIRST_IMAG_CONV:.+]] = sext i12 %[[FIRST_IMAG]]
- // CHECK: %[[SECOND_REALP:.+]] = getelementptr inbounds { i33, i33 }, { i33, i33 }* %{{.+}}, i32 0, i32 0
- // CHECK: %[[SECOND_REAL:.+]] = load i33, i33* %[[SECOND_REALP]]
- // CHECK: %[[SECOND_IMAGP:.+]] = getelementptr inbounds { i33, i33 }, { i33, i33 }* %{{.+}}, i32 0, i32 1
- // CHECK: %[[SECOND_IMAG:.+]] = load i33, i33* %[[SECOND_IMAGP]]
+ // CHECK: %[[SECOND_REALP:.+]] = getelementptr inbounds { i33, i33 }, ptr %{{.+}}, i32 0, i32 0
+ // CHECK: %[[SECOND_REAL:.+]] = load i33, ptr %[[SECOND_REALP]]
+ // CHECK: %[[SECOND_IMAGP:.+]] = getelementptr inbounds { i33, i33 }, ptr %{{.+}}, i32 0, i32 1
+ // CHECK: %[[SECOND_IMAG:.+]] = load i33, ptr %[[SECOND_IMAGP]]
// CHECK: %[[REAL:.+]] = add i33 %[[FIRST_REAL_CONV]], %[[SECOND_REAL]]
// CHECK: %[[IMAG:.+]] = add i33 %[[FIRST_IMAG_CONV]], %[[SECOND_IMAG]]
}
@@ -617,9 +590,9 @@ void VectorTest(uint16_t4 first, uint16_t4 second) {
void TBAATest(_BitInt(sizeof(int) * 8) ExtInt,
unsigned _BitInt(sizeof(int) * 8) ExtUInt,
_BitInt(6) Other) {
- // CHECK-DAG: store i32 %{{.+}}, i32* %{{.+}}, align 4, !tbaa ![[EXTINT_TBAA:.+]]
- // CHECK-DAG: store i32 %{{.+}}, i32* %{{.+}}, align 4, !tbaa ![[EXTINT_TBAA]]
- // CHECK-DAG: store i6 %{{.+}}, i6* %{{.+}}, align 1, !tbaa ![[EXTINT6_TBAA:.+]]
+ // CHECK-DAG: store i32 %{{.+}}, ptr %{{.+}}, align 4, !tbaa ![[EXTINT_TBAA:.+]]
+ // CHECK-DAG: store i32 %{{.+}}, ptr %{{.+}}, align 4, !tbaa ![[EXTINT_TBAA]]
+ // CHECK-DAG: store i6 %{{.+}}, ptr %{{.+}}, align 1, !tbaa ![[EXTINT6_TBAA:.+]]
ExtInt = 5;
ExtUInt = 5;
Other = 5;
diff --git a/clang/test/CodeGenCXX/float16-declarations.cpp b/clang/test/CodeGenCXX/float16-declarations.cpp
index f6f2fc59fea40..7db8a3dcf5dec 100644
--- a/clang/test/CodeGenCXX/float16-declarations.cpp
+++ b/clang/test/CodeGenCXX/float16-declarations.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang -Xclang -no-opaque-pointers -std=c++11 --target=aarch64-arm--eabi -S -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64
+// RUN: %clang -std=c++11 --target=aarch64-arm--eabi -S -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64
/* Various contexts where type _Float16 can appear. */
@@ -54,12 +54,12 @@ class C1 {
public:
C1(_Float16 arg) : f1c(arg), f3c(arg) { }
// Check that we mangle _Float16 to DF16_
-// CHECK-DAG: define linkonce_odr dso_local void @_ZN2C1C2EDF16_(%class.C1*{{.*}}, half{{.*}})
+// CHECK-DAG: define linkonce_odr dso_local void @_ZN2C1C2EDF16_(ptr{{.*}}, half{{.*}})
_Float16 func1c(_Float16 arg ) {
return f1c + arg;
}
-// CHECK-DAG: define linkonce_odr dso_local noundef half @_ZN2C16func1cEDF16_(%class.C1*{{.*}}, half{{.*}})
+// CHECK-DAG: define linkonce_odr dso_local noundef half @_ZN2C16func1cEDF16_(ptr{{.*}}, half{{.*}})
static _Float16 func2c(_Float16 arg) {
return arg * C1::f2c;
@@ -89,55 +89,54 @@ extern int printf (const char *__restrict __format, ...);
int main(void) {
_Float16 f1l = 1e3f16;
-// CHECK-DAG: store half 0xH63D0, half* %{{.*}}, align 2
+// CHECK-DAG: store half 0xH63D0, ptr %{{.*}}, align 2
_Float16 f2l = -0.f16;
-// CHECK-DAG: store half 0xH8000, half* %{{.*}}, align 2
+// CHECK-DAG: store half 0xH8000, ptr %{{.*}}, align 2
_Float16 f3l = 1.000976562;
-// CHECK-DAG: store half 0xH3C01, half* %{{.*}}, align 2
+// CHECK-DAG: store half 0xH3C01, ptr %{{.*}}, align 2
C1 c1(f1l);
-// CHECK-DAG: [[F1L:%[a-z0-9]+]] = load half, half* %{{.*}}, align 2
-// CHECK-DAG: call void @_ZN2C1C2EDF16_(%class.C1* {{[^,]*}} %{{.*}}, half noundef %{{.*}})
+// CHECK-DAG: [[F1L:%[a-z0-9]+]] = load half, ptr %{{.*}}, align 2
+// CHECK-DAG: call void @_ZN2C1C2EDF16_(ptr {{[^,]*}} %{{.*}}, half noundef %{{.*}})
S1<_Float16> s1 = { 132.f16 };
// CHECK-DAG: @__const.main.s1 = private unnamed_addr constant %struct.S1 { half 0xH5820 }, align 2
-// CHECK-DAG: [[S1:%[0-9]+]] = bitcast %struct.S1* %{{.*}} to i8*
-// CHECK-DAG: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 2 [[S1]], i8* align 2 bitcast (%struct.S1* @__const.main.s1 to i8*), i64 2, i1 false)
+// CHECK-DAG: call void @llvm.memcpy.p0.p0.i64(ptr align 2 %{{.*}}, ptr align 2 @__const.main.s1, i64 2, i1 false)
_Float16 f4l = func1n(f1l) + func1f(f2l) + c1.func1c(f3l) + c1.func2c(f1l) +
func1t(f1l) + s1.mem2 - f1n + f2n;
auto f5l = -1.f16, *f6l = &f2l, f7l = func1t(f3l);
-// CHECK-DAG: store half 0xHBC00, half* %{{.*}}, align 2
-// CHECK-DAG: store half* %{{.*}}, half** %{{.*}}, align 8
+// CHECK-DAG: store half 0xHBC00, ptr %{{.*}}, align 2
+// CHECK-DAG: store ptr %{{.*}}, ptr %{{.*}}, align 8
_Float16 f8l = f4l++;
-// CHECK-DAG: %{{.*}} = load half, half* %{{.*}}, align 2
+// CHECK-DAG: %{{.*}} = load half, ptr %{{.*}}, align 2
// CHECK-DAG: [[INC:%[a-z0-9]+]] = fadd half {{.*}}, 0xH3C00
-// CHECK-DAG: store half [[INC]], half* %{{.*}}, align 2
+// CHECK-DAG: store half [[INC]], ptr %{{.*}}, align 2
_Float16 arr1l[] = { -1.f16, -0.f16, -11.f16 };
// CHECK-DAG: @__const.main.arr1l = private unnamed_addr constant [3 x half] [half 0xHBC00, half 0xH8000, half 0xHC980], align 2
float cvtf = f2n;
//CHECK-DAG: [[H2F:%[a-z0-9]+]] = fpext half {{%[0-9]+}} to float
-//CHECK-DAG: store float [[H2F]], float* %{{.*}}, align 4
+//CHECK-DAG: store float [[H2F]], ptr %{{.*}}, align 4
double cvtd = f2n;
//CHECK-DAG: [[H2D:%[a-z0-9]+]] = fpext half {{%[0-9]+}} to double
-//CHECK-DAG: store double [[H2D]], double* %{{.*}}, align 8
+//CHECK-DAG: store double [[H2D]], ptr %{{.*}}, align 8
long double cvtld = f2n;
//CHECK-AARCh64-DAG: [[H2LD:%[a-z0-9]+]] = fpext half {{%[0-9]+}} to fp128
-//CHECK-AARCh64-DAG: store fp128 [[H2LD]], fp128* %{{.*}}, align 16
+//CHECK-AARCh64-DAG: store fp128 [[H2LD]], ptr %{{.*}}, align 16
_Float16 f2h = 42.0f;
-//CHECK-DAG: store half 0xH5140, half* %{{.*}}, align 2
+//CHECK-DAG: store half 0xH5140, ptr %{{.*}}, align 2
_Float16 d2h = 42.0;
-//CHECK-DAG: store half 0xH5140, half* %{{.*}}, align 2
+//CHECK-DAG: store half 0xH5140, ptr %{{.*}}, align 2
_Float16 ld2h = 42.0l;
-//CHECK-DAG:store half 0xH5140, half* %{{.*}}, align 2
+//CHECK-DAG:store half 0xH5140, ptr %{{.*}}, align 2
}
diff --git a/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp b/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp
index 7b36c3f42122f..e4084b6db009e 100644
--- a/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp
+++ b/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp
@@ -1,17 +1,17 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64 %s -fno-use-cxa-atexit -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64 %s -fno-use-cxa-atexit -emit-llvm -o - | FileCheck %s
// PR7097
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64 %s -fno-use-cxa-atexit -mconstructor-aliases -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64 %s -fno-use-cxa-atexit -mconstructor-aliases -emit-llvm -o - | FileCheck %s
-// CHECK: call void @_ZN1AC1Ev([[A:%.*]]* {{[^,]*}} @a)
-// CHECK-NEXT: call i32 @atexit(void ()* @__dtor_a)
+// CHECK: call void @_ZN1AC1Ev(ptr {{[^,]*}} @a)
+// CHECK-NEXT: call i32 @atexit(ptr @__dtor_a)
// CHECK: define internal void @__dtor_a() [[NUW:#[0-9]+]]
-// CHECK: call void @_ZN1AD1Ev([[A]]* @a)
+// CHECK: call void @_ZN1AD1Ev(ptr @a)
-// CHECK: call void @_ZN1AC1Ev([[A]]* {{[^,]*}} @b)
-// CHECK-NEXT: call i32 @atexit(void ()* @__dtor_b)
+// CHECK: call void @_ZN1AC1Ev(ptr {{[^,]*}} @b)
+// CHECK-NEXT: call i32 @atexit(ptr @__dtor_b)
// CHECK: define internal void @__dtor_b() [[NUW]]
-// CHECK: call void @_ZN1AD1Ev([[A]]* @b)
+// CHECK: call void @_ZN1AD1Ev(ptr @b)
class A {
public:
@@ -23,21 +23,21 @@ A a, b;
// PR9593
// CHECK-LABEL: define{{.*}} void @_Z4funcv()
-// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZ4funcvE2a1)
-// CHECK: call void @_ZN1AC1Ev([[A]]* {{[^,]*}} @_ZZ4funcvE2a1)
-// CHECK-NEXT: call i32 @atexit(void ()* @__dtor__ZZ4funcvE2a1)
-// CHECK-NEXT: call void @__cxa_guard_release(i64* @_ZGVZ4funcvE2a1)
+// CHECK: call i32 @__cxa_guard_acquire(ptr @_ZGVZ4funcvE2a1)
+// CHECK: call void @_ZN1AC1Ev(ptr {{[^,]*}} @_ZZ4funcvE2a1)
+// CHECK-NEXT: call i32 @atexit(ptr @__dtor__ZZ4funcvE2a1)
+// CHECK-NEXT: call void @__cxa_guard_release(ptr @_ZGVZ4funcvE2a1)
-// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZ4funcvE2a2)
-// CHECK: call void @_ZN1AC1Ev([[A]]* {{[^,]*}} @_ZZ4funcvE2a2)
-// CHECK-NEXT: call i32 @atexit(void ()* @__dtor__ZZ4funcvE2a2)
-// CHECK-NEXT: call void @__cxa_guard_release(i64* @_ZGVZ4funcvE2a2)
+// CHECK: call i32 @__cxa_guard_acquire(ptr @_ZGVZ4funcvE2a2)
+// CHECK: call void @_ZN1AC1Ev(ptr {{[^,]*}} @_ZZ4funcvE2a2)
+// CHECK-NEXT: call i32 @atexit(ptr @__dtor__ZZ4funcvE2a2)
+// CHECK-NEXT: call void @__cxa_guard_release(ptr @_ZGVZ4funcvE2a2)
// CHECK: define internal void @__dtor__ZZ4funcvE2a1() [[NUW]]
-// CHECK: call void @_ZN1AD1Ev([[A]]* @_ZZ4funcvE2a1)
+// CHECK: call void @_ZN1AD1Ev(ptr @_ZZ4funcvE2a1)
// CHECK: define internal void @__dtor__ZZ4funcvE2a2() [[NUW]]
-// CHECK: call void @_ZN1AD1Ev([[A]]* @_ZZ4funcvE2a2)
+// CHECK: call void @_ZN1AD1Ev(ptr @_ZZ4funcvE2a2)
void func() {
static A a1, a2;
diff --git a/clang/test/CodeGenCXX/goto.cpp b/clang/test/CodeGenCXX/goto.cpp
index e79016da137d5..8a1e24ad7e5af 100644
--- a/clang/test/CodeGenCXX/goto.cpp
+++ b/clang/test/CodeGenCXX/goto.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -fcxx-exceptions -fexceptions -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -fcxx-exceptions -fexceptions -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fcxx-exceptions -fexceptions -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fcxx-exceptions -fexceptions -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
// Reduced from a crash on boost::interprocess's node_allocator_test.cpp.
namespace test0 {
@@ -12,22 +12,21 @@ namespace test0 {
// CHECK-NEXT: [[X:%.*]] = alloca i32
// CHECK-NEXT: [[Y:%.*]] = alloca [[A:%.*]],
// CHECK-NEXT: [[Z:%.*]] = alloca [[A]]
- // CHECK-NEXT: [[EXN:%.*]] = alloca i8*
+ // CHECK-NEXT: [[EXN:%.*]] = alloca ptr
// CHECK-NEXT: [[SEL:%.*]] = alloca i32
- // CHECK-NEXT: [[V:%.*]] = alloca [[V:%.*]]*,
+ // CHECK-NEXT: [[V:%.*]] = alloca ptr,
// CHECK-NEXT: [[TMP:%.*]] = alloca [[A]]
// CHECK-NEXT: [[CLEANUPACTIVE:%.*]] = alloca i1
- // CHECK: call void @_ZN5test01AC1Ev([[A]]* {{[^,]*}} [[Y]])
- // CHECK-NEXT: invoke void @_ZN5test01AC1Ev([[A]]* {{[^,]*}} [[Z]])
- // CHECK: [[NEW:%.*]] = invoke noalias noundef nonnull i8* @_Znwm(i64 noundef 1)
- // CHECK: store i1 true, i1* [[CLEANUPACTIVE]]
- // CHECK: [[NEWCAST:%.*]] = bitcast i8* [[NEW]] to [[V]]*
- // CHECK-NEXT: invoke void @_ZN5test01AC1Ev([[A]]* {{[^,]*}} [[TMP]])
- // CHECK: invoke void @_ZN5test01VC1ERKNS_1AE([[V]]* {{[^,]*}} [[NEWCAST]], [[A]]* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[TMP]])
- // CHECK: store i1 false, i1* [[CLEANUPACTIVE]]
+ // CHECK: call void @_ZN5test01AC1Ev(ptr {{[^,]*}} [[Y]])
+ // CHECK-NEXT: invoke void @_ZN5test01AC1Ev(ptr {{[^,]*}} [[Z]])
+ // CHECK: [[NEW:%.*]] = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 1)
+ // CHECK: store i1 true, ptr [[CLEANUPACTIVE]]
+ // CHECK-NEXT: invoke void @_ZN5test01AC1Ev(ptr {{[^,]*}} [[TMP]])
+ // CHECK: invoke void @_ZN5test01VC1ERKNS_1AE(ptr {{[^,]*}} [[NEW]], ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[TMP]])
+ // CHECK: store i1 false, ptr [[CLEANUPACTIVE]]
- // CHECK98-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[TMP]])
- // CHECK11-NEXT: call void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[TMP]])
+ // CHECK98-NEXT: invoke void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[TMP]])
+ // CHECK11-NEXT: call void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[TMP]])
A y;
try {
A z;
diff --git a/clang/test/CodeGenCXX/init-invariant.cpp b/clang/test/CodeGenCXX/init-invariant.cpp
index 2fd01d3095b7b..3bbea9b32d3e6 100644
--- a/clang/test/CodeGenCXX/init-invariant.cpp
+++ b/clang/test/CodeGenCXX/init-invariant.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-linux-gnu -emit-llvm %s -disable-llvm-passes -o - | FileCheck %s --check-prefix=CHECK-O0
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-linux-gnu -emit-llvm %s -O1 -disable-llvm-passes -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686-linux-gnu -emit-llvm %s -disable-llvm-passes -o - | FileCheck %s --check-prefix=CHECK-O0
+// RUN: %clang_cc1 -triple i686-linux-gnu -emit-llvm %s -O1 -disable-llvm-passes -o - | FileCheck %s
// Check that we add an llvm.invariant.start.p0i8 to mark when a global becomes
// read-only. If globalopt can fold the initializer, it will then mark the
@@ -41,20 +41,20 @@ void e() {
static const A a = A();
}
-// CHECK: call void @_ZN1AC1Ev({{.*}}* noundef {{[^,]*}} @a)
-// CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* bitcast ({{.*}} @a to i8*))
+// CHECK: call void @_ZN1AC1Ev(ptr noundef {{[^,]*}} @a)
+// CHECK: call {{.*}}@llvm.invariant.start.p0(i64 4, ptr @a)
-// CHECK: call void @_ZN1BC1Ev({{.*}}* noundef {{[^,]*}} @b)
-// CHECK-NOT: call {{.*}}@llvm.invariant.start.p0i8(i64 noundef 4, i8* bitcast ({{.*}} @b to i8*))
+// CHECK: call void @_ZN1BC1Ev(ptr noundef {{[^,]*}} @b)
+// CHECK-NOT: call {{.*}}@llvm.invariant.start.p0(i64 noundef 4, ptr @b)
-// CHECK: call void @_ZN1CC1Ev({{.*}}* noundef {{[^,]*}} @c)
-// CHECK-NOT: call {{.*}}@llvm.invariant.start.p0i8(i64 noundef 4, i8* bitcast ({{.*}} @c to i8*))
+// CHECK: call void @_ZN1CC1Ev(ptr noundef {{[^,]*}} @c)
+// CHECK-NOT: call {{.*}}@llvm.invariant.start.p0(i64 noundef 4, ptr @c)
// CHECK: call noundef i32 @_Z1fv(
-// CHECK: store {{.*}}, i32* @d
-// CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* bitcast ({{.*}} @d to i8*))
+// CHECK: store {{.*}}, ptr @d
+// CHECK: call {{.*}}@llvm.invariant.start.p0(i64 4, ptr @d)
// CHECK-LABEL: define{{.*}} void @_Z1ev(
-// CHECK: call void @_ZN1AC1Ev(%struct.A* noundef {{[^,]*}} @_ZZ1evE1a)
-// CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* {{.*}}bitcast ({{.*}} @_ZZ1evE1a to i8*))
+// CHECK: call void @_ZN1AC1Ev(ptr noundef {{[^,]*}} @_ZZ1evE1a)
+// CHECK: call {{.*}}@llvm.invariant.start.p0(i64 4, ptr {{.*}}@_ZZ1evE1a)
// CHECK-NOT: llvm.invariant.end
diff --git a/clang/test/CodeGenCXX/lifetime-sanitizer.cpp b/clang/test/CodeGenCXX/lifetime-sanitizer.cpp
index a9411caa7f95f..33a8566092519 100644
--- a/clang/test/CodeGenCXX/lifetime-sanitizer.cpp
+++ b/clang/test/CodeGenCXX/lifetime-sanitizer.cpp
@@ -1,13 +1,13 @@
-// RUN: %clang -Xclang -no-opaque-pointers -w -target x86_64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
+// RUN: %clang -w -target x86_64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
// RUN: -Xclang -disable-llvm-passes %s | FileCheck %s -check-prefixes=CHECK \
// RUN: --implicit-check-not=llvm.lifetime
-// RUN: %clang -Xclang -no-opaque-pointers -w -target x86_64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
+// RUN: %clang -w -target x86_64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
// RUN: -fsanitize=address -fsanitize-address-use-after-scope \
// RUN: -Xclang -disable-llvm-passes %s | FileCheck %s -check-prefixes=CHECK,LIFETIME
-// RUN: %clang -Xclang -no-opaque-pointers -w -target x86_64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
+// RUN: %clang -w -target x86_64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
// RUN: -fsanitize=memory -Xclang -disable-llvm-passes %s | \
// RUN: FileCheck %s -check-prefixes=CHECK,LIFETIME
-// RUN: %clang -Xclang -no-opaque-pointers -w -target aarch64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
+// RUN: %clang -w -target aarch64-linux-gnu -S -emit-llvm -o - -fno-exceptions -O0 \
// RUN: -fsanitize=hwaddress -Xclang -disable-llvm-passes %s | \
// RUN: FileCheck %s -check-prefixes=CHECK,LIFETIME
@@ -27,12 +27,12 @@ extern "C" void a(), b(), c(), d();
// CHECK: define dso_local void @_Z3fooi(i32 noundef %[[N:[^)]+]])
void foo(int n) {
- // CHECK: store i32 %[[N]], i32* %[[NADDR:[^,]+]]
+ // CHECK: store i32 %[[N]], ptr %[[NADDR:[^,]+]]
// CHECK-LABEL: call void @a()
a();
// CHECK-LABEL: call void @b()
- // CHECK: [[NARG:%[^ ]+]] = load i32, i32* %[[NADDR]]
+ // CHECK: [[NARG:%[^ ]+]] = load i32, ptr %[[NADDR]]
// CHECK: [[BOOL:%[^ ]+]] = icmp ne i32 [[NARG]], 0
// CHECK: store i1 false
// CHECK: br i1 [[BOOL]], label %[[ONTRUE:[^,]+]], label %[[ONFALSE:[^,]+]]
diff --git a/clang/test/CodeGenCXX/mangle-lambdas-cxx14.cpp b/clang/test/CodeGenCXX/mangle-lambdas-cxx14.cpp
index 5049356bd7356..fbecc6cf6ab92 100644
--- a/clang/test/CodeGenCXX/mangle-lambdas-cxx14.cpp
+++ b/clang/test/CodeGenCXX/mangle-lambdas-cxx14.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
template<typename T = int>
auto ft1() {
diff --git a/clang/test/CodeGenCXX/mangle-lambdas-cxx20.cpp b/clang/test/CodeGenCXX/mangle-lambdas-cxx20.cpp
index 0e080e789948c..4871e9d00e73f 100644
--- a/clang/test/CodeGenCXX/mangle-lambdas-cxx20.cpp
+++ b/clang/test/CodeGenCXX/mangle-lambdas-cxx20.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
template <typename T>
auto ft1() {
diff --git a/clang/test/CodeGenCXX/member-expressions.cpp b/clang/test/CodeGenCXX/member-expressions.cpp
index 1d891ef99b14a..0e57c7e1af26e 100644
--- a/clang/test/CodeGenCXX/member-expressions.cpp
+++ b/clang/test/CodeGenCXX/member-expressions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s
// PR5392
namespace PR5392 {
@@ -10,9 +10,9 @@ struct A
A a1;
void f()
{
- // CHECK: store i32 10, i32* @_ZN6PR53921A1aE
+ // CHECK: store i32 10, ptr @_ZN6PR53921A1aE
a1.a = 10;
- // CHECK: store i32 20, i32* @_ZN6PR53921A1aE
+ // CHECK: store i32 20, ptr @_ZN6PR53921A1aE
A().a = 20;
}
@@ -29,7 +29,7 @@ A *g();
void f(A *a) {
A::E e1 = a->Foo;
- // CHECK: call noundef %struct.A* @_Z1gv()
+ // CHECK: call noundef ptr @_Z1gv()
A::E e2 = g()->Foo;
// CHECK: call void @_ZN1AC1Ev(
// CHECK: call void @_ZN1AD1Ev(
@@ -61,26 +61,20 @@ namespace test4 {
// CHECK-LABEL: define{{.*}} i32 @_ZN5test44testEv()
int test() {
// CHECK: load {{.*}} @_ZN5test45c_ptrE
- // CHECK-NEXT: bitcast
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: bitcast
// CHECK-NEXT: call void @_ZN5test41B3fooEv
c_ptr->B::foo();
// CHECK: load {{.*}} @_ZN5test45c_ptrE
- // CHECK-NEXT: bitcast
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: bitcast
// CHECK-NEXT: getelementptr
// CHECK-NEXT: store i32 5
c_ptr->B::x = 5;
// CHECK: load {{.*}} @_ZN5test45c_ptrE
- // CHECK-NEXT: bitcast
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: bitcast
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: load i32, i32*
+ // CHECK-NEXT: load i32, ptr
return c_ptr->B::x;
}
}
diff --git a/clang/test/CodeGenCXX/microsoft-abi-vftables.cpp b/clang/test/CodeGenCXX/microsoft-abi-vftables.cpp
index cebe2b9bac398..bc278bdb847fc 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vftables.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vftables.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -fno-rtti -triple=i386-pc-win32 -fms-extensions -emit-llvm -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefix=NO-RTTI
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=i386-pc-win32 -fms-extensions -emit-llvm -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefix=RTTI
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -fms-extensions -emit-llvm -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefix=NO-RTTI
+// RUN: %clang_cc1 %s -triple=i386-pc-win32 -fms-extensions -emit-llvm -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefix=RTTI
// RTTI-DAG: $"??_7S@@6B@" = comdat largest
// RTTI-DAG: $"??_7V@@6B@" = comdat largest
@@ -8,38 +8,38 @@ struct S {
virtual ~S();
} s;
-// RTTI-DAG: [[VTABLE_S:@.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast ({{.*}} @"??_R4S@@6B@" to i8*), i8* bitcast ({{.*}} @"??_GS@@UAEPAXI at Z" to i8*)] }, comdat($"??_7S@@6B@")
-// RTTI-DAG: @"??_7S@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[VTABLE_S]], i32 0, i32 0, i32 1)
+// RTTI-DAG: [[VTABLE_S:@.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4S@@6B@", ptr @"??_GS@@UAEPAXI at Z"] }, comdat($"??_7S@@6B@")
+// RTTI-DAG: @"??_7S@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[VTABLE_S]], i32 0, i32 0, i32 1)
-// NO-RTTI-DAG: @"??_7S@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast ({{.*}} @"??_GS@@UAEPAXI at Z" to i8*)] }
+// NO-RTTI-DAG: @"??_7S@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @"??_GS@@UAEPAXI at Z"] }
struct __declspec(dllimport) U {
virtual ~U();
} u;
-// RTTI-DAG: [[VTABLE_U:@.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast ({{.*}} @"??_R4U@@6B@" to i8*), i8* bitcast ({{.*}} @"??_GU@@UAEPAXI at Z" to i8*)] }
-// RTTI-DAG: @"??_SU@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[VTABLE_U]], i32 0, i32 0, i32 1)
+// RTTI-DAG: [[VTABLE_U:@.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4U@@6B@", ptr @"??_GU@@UAEPAXI at Z"] }
+// RTTI-DAG: @"??_SU@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[VTABLE_U]], i32 0, i32 0, i32 1)
-// NO-RTTI-DAG: @"??_SU@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast ({{.*}} @"??_GU@@UAEPAXI at Z" to i8*)] }
+// NO-RTTI-DAG: @"??_SU@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @"??_GU@@UAEPAXI at Z"] }
struct __declspec(dllexport) V {
virtual ~V();
} v;
-// RTTI-DAG: [[VTABLE_V:@.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast ({{.*}} @"??_R4V@@6B@" to i8*), i8* bitcast ({{.*}} @"??_GV@@UAEPAXI at Z" to i8*)] }, comdat($"??_7V@@6B@")
-// RTTI-DAG: @"??_7V@@6B@" = dllexport unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[VTABLE_V]], i32 0, i32 0, i32 1)
+// RTTI-DAG: [[VTABLE_V:@.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4V@@6B@", ptr @"??_GV@@UAEPAXI at Z"] }, comdat($"??_7V@@6B@")
+// RTTI-DAG: @"??_7V@@6B@" = dllexport unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[VTABLE_V]], i32 0, i32 0, i32 1)
-// NO-RTTI-DAG: @"??_7V@@6B@" = weak_odr dllexport unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast ({{.*}} @"??_GV@@UAEPAXI at Z" to i8*)] }
+// NO-RTTI-DAG: @"??_7V@@6B@" = weak_odr dllexport unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @"??_GV@@UAEPAXI at Z"] }
namespace {
struct W {
virtual ~W() {}
} w;
}
-// RTTI-DAG: [[VTABLE_W:@.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast ({{.*}} @"??_R4W@?A0x{{[^@]*}}@@6B@" to i8*), i8* bitcast ({{.*}} @"??_GW@?A0x{{[^@]*}}@@UAEPAXI at Z" to i8*)] }
-// RTTI-DAG: @"??_7W@?A0x{{[^@]*}}@@6B@" = internal unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[VTABLE_W]], i32 0, i32 0, i32 1)
+// RTTI-DAG: [[VTABLE_W:@.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4W@?A0x{{[^@]*}}@@6B@", ptr @"??_GW@?A0x{{[^@]*}}@@UAEPAXI at Z"] }
+// RTTI-DAG: @"??_7W@?A0x{{[^@]*}}@@6B@" = internal unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[VTABLE_W]], i32 0, i32 0, i32 1)
-// NO-RTTI-DAG: @"??_7W@?A0x{{[^@]*}}@@6B@" = internal unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast ({{.*}} @"??_GW@?A0x{{[^@]*}}@@UAEPAXI at Z" to i8*)] }
+// NO-RTTI-DAG: @"??_7W@?A0x{{[^@]*}}@@6B@" = internal unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @"??_GW@?A0x{{[^@]*}}@@UAEPAXI at Z"] }
struct X {};
template <class> struct Y : virtual X {
@@ -49,7 +49,7 @@ template <class> struct Y : virtual X {
extern template class Y<int>;
template Y<int>::Y();
-// RTTI-DAG: [[VTABLE_Y:@.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4?$Y at H@@6B@" to i8*), i8* bitcast (i8* (%struct.Y*, i32)* @"??_G?$Y at H@@UAEPAXI at Z" to i8*)] }, comdat($"??_7?$Y at H@@6B@")
-// RTTI-DAG: @"??_7?$Y at H@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[VTABLE_Y]], i32 0, i32 0, i32 1)
+// RTTI-DAG: [[VTABLE_Y:@.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4?$Y at H@@6B@", ptr @"??_G?$Y at H@@UAEPAXI at Z"] }, comdat($"??_7?$Y at H@@6B@")
+// RTTI-DAG: @"??_7?$Y at H@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[VTABLE_Y]], i32 0, i32 0, i32 1)
-// NO-RTTI-DAG: @"??_7?$Y at H@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast (i8* (%struct.Y*, i32)* @"??_G?$Y at H@@UAEPAXI at Z" to i8*)] }, comdat
+// NO-RTTI-DAG: @"??_7?$Y at H@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @"??_G?$Y at H@@UAEPAXI at Z"] }, comdat
diff --git a/clang/test/CodeGenCXX/microsoft-abi-vmemptr-vbase.cpp b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-vbase.cpp
index c4630b67054b7..342e9b34c8e19 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vmemptr-vbase.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-vbase.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fno-rtti -emit-llvm -triple=i386-pc-win32 -fms-extensions -fms-compatibility -std=c++11 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=i386-pc-win32 -fms-extensions -fms-compatibility -std=c++11 %s -o - | FileCheck %s
namespace PR23452 {
struct A {
@@ -8,5 +8,5 @@ struct B : virtual A {
virtual void f();
};
void (B::*MemPtr)(void) = &B::f;
-// CHECK-DAG: @"?MemPtr at PR23452@@3P8B at 1@AEXXZQ21@" = dso_local global { i8*, i32, i32 } { i8* bitcast ({{.*}} @"??_9B at PR23452@@$BA at AE" to i8*), i32 0, i32 4 }
+// CHECK-DAG: @"?MemPtr at PR23452@@3P8B at 1@AEXXZQ21@" = dso_local global { ptr, i32, i32 } { ptr @"??_9B at PR23452@@$BA at AE", i32 0, i32 4 }
}
diff --git a/clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp b/clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp
index 3df17071d70fb..069f0226ab948 100644
--- a/clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp
+++ b/clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -fno-rtti-data -triple=i386-pc-win32 -o - -emit-llvm | FileCheck %s
+// RUN: %clang_cc1 %s -fno-rtti-data -triple=i386-pc-win32 -o - -emit-llvm | FileCheck %s
// vftable shouldn't have RTTI data in it.
// CHECK-NOT: @"??_R4S@@6B@"
-// CHECK: @"??_7S@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast ({{.*}} @"??_GS@@UAEPAXI at Z" to i8*)] }, comdat
+// CHECK: @"??_7S@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @"??_GS@@UAEPAXI at Z"] }, comdat
struct type_info;
namespace std { using ::type_info; }
@@ -19,4 +19,4 @@ extern S *getS();
const std::type_info &ti = typeid(*getS());
const U &u = dynamic_cast<U &>(*getS());
-// CHECK: call i8* @__RTDynamicCast(i8* %{{.+}}, i32 0, i8* bitcast ({{.*}} @"??_R0?AUS@@@8" to i8*), i8* bitcast ({{.*}} @"??_R0?AUU@@@8" to i8*), i32 1)
+// CHECK: call ptr @__RTDynamicCast(ptr %{{.+}}, i32 0, ptr @"??_R0?AUS@@@8", ptr @"??_R0?AUU@@@8", i32 1)
diff --git a/clang/test/CodeGenCXX/new-array-init.cpp b/clang/test/CodeGenCXX/new-array-init.cpp
index 3fcd91754a77d..db740d065e2f7 100644
--- a/clang/test/CodeGenCXX/new-array-init.cpp
+++ b/clang/test/CodeGenCXX/new-array-init.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple i386-unknown-unknown %s -emit-llvm -fsanitize=signed-integer-overflow -o - | FileCheck --check-prefix=SIO %s
+// RUN: %clang_cc1 -std=c++11 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple i386-unknown-unknown %s -emit-llvm -fsanitize=signed-integer-overflow -o - | FileCheck --check-prefix=SIO %s
// CHECK: @[[ABC4:.*]] = {{.*}} constant [4 x i8] c"abc\00"
// CHECK: @[[ABC15:.*]] = {{.*}} constant [15 x i8] c"abc\00\00\00\00
@@ -18,7 +18,7 @@ void fn(int n) {
// CHECK-LABEL: define{{.*}} void @_Z11const_exactv
void const_exact() {
// CHECK-NOT: icmp ult i{{32|64}} %{{[^ ]+}}, 3
- // CHECK-NOT: icmp eq i32*
+ // CHECK-NOT: icmp eq ptr
new int[3] { 1, 2, 3 };
}
@@ -34,12 +34,12 @@ void check_array_value_init() {
struct S;
new (int S::*[3][4][5]) ();
- // CHECK: call noalias noundef nonnull i8* @_Zna{{.}}(i{{32 noundef 240|64 noundef 480}})
- // CHECK: getelementptr inbounds i{{32|64}}, i{{32|64}}* {{.*}}, i{{32|64}} 60
+ // CHECK: call noalias noundef nonnull ptr @_Zna{{.}}(i{{32 noundef 240|64 noundef 480}})
+ // CHECK: getelementptr inbounds i{{32|64}}, ptr {{.*}}, i{{32|64}} 60
// CHECK: phi
// CHECK: store i{{32|64}} -1,
- // CHECK: getelementptr inbounds i{{32|64}}, i{{32|64}}* {{.*}}, i{{32|64}} 1
+ // CHECK: getelementptr inbounds i{{32|64}}, ptr {{.*}}, i{{32|64}} 1
// CHECK: icmp eq
// CHECK: br i1
}
@@ -49,19 +49,19 @@ void string_nonconst(int n) {
// CHECK: icmp slt i{{32|64}} %{{[^ ]+}}, 4
// FIXME: Conditionally throw an exception rather than passing -1 to alloc function
// CHECK: select
- // CHECK: %[[PTR:.*]] = call noalias noundef nonnull i8* @_Zna{{.}}(i{{32|64}}
- // CHECK: call void @llvm.memcpy{{.*}}(i8* align {{[0-9]+}} %[[PTR]], i8* align {{[0-9]+}} getelementptr inbounds ([4 x i8], [4 x i8]* @[[ABC4]], i32 0, i32 0), i32 4,
- // CHECK: %[[REST:.*]] = getelementptr inbounds i8, i8* %[[PTR]], i32 4
+ // CHECK: %[[PTR:.*]] = call noalias noundef nonnull ptr @_Zna{{.}}(i{{32|64}}
+ // CHECK: call void @llvm.memcpy{{.*}}(ptr align {{[0-9]+}} %[[PTR]], ptr align {{[0-9]+}} @[[ABC4]], i32 4,
+ // CHECK: %[[REST:.*]] = getelementptr inbounds i8, ptr %[[PTR]], i32 4
// CHECK: %[[RESTSIZE:.*]] = sub {{.*}}, 4
- // CHECK: call void @llvm.memset{{.*}}(i8* align {{[0-9]+}} %[[REST]], i8 0, i{{32|64}} %[[RESTSIZE]],
+ // CHECK: call void @llvm.memset{{.*}}(ptr align {{[0-9]+}} %[[REST]], i8 0, i{{32|64}} %[[RESTSIZE]],
new char[n] { "abc" };
}
// CHECK-LABEL: define{{.*}} void @_Z12string_exactv
void string_exact() {
// CHECK-NOT: icmp
- // CHECK: %[[PTR:.*]] = call noalias noundef nonnull i8* @_Zna{{.}}(i{{32|64}} noundef 4)
- // CHECK: call void @llvm.memcpy{{.*}}(i8* align {{[0-9]+}} %[[PTR]], i8* align {{[0-9]+}} getelementptr inbounds ([4 x i8], [4 x i8]* @[[ABC4]], i32 0, i32 0), i32 4,
+ // CHECK: %[[PTR:.*]] = call noalias noundef nonnull ptr @_Zna{{.}}(i{{32|64}} noundef 4)
+ // CHECK: call void @llvm.memcpy{{.*}}(ptr align {{[0-9]+}} %[[PTR]], ptr align {{[0-9]+}} @[[ABC4]], i32 4,
// CHECK-NOT: memset
new char[4] { "abc" };
}
@@ -69,9 +69,9 @@ void string_exact() {
// CHECK-LABEL: define{{.*}} void @_Z17string_sufficientv
void string_sufficient() {
// CHECK-NOT: icmp
- // CHECK: %[[PTR:.*]] = call noalias noundef nonnull i8* @_Zna{{.}}(i{{32|64}} noundef 15)
+ // CHECK: %[[PTR:.*]] = call noalias noundef nonnull ptr @_Zna{{.}}(i{{32|64}} noundef 15)
// FIXME: For very large arrays, it would be preferable to emit a small copy and a memset.
- // CHECK: call void @llvm.memcpy{{.*}}(i8* align {{[0-9]+}} %[[PTR]], i8* align {{[0-9]+}} getelementptr inbounds ([15 x i8], [15 x i8]* @[[ABC15]], i32 0, i32 0), i32 15,
+ // CHECK: call void @llvm.memcpy{{.*}}(ptr align {{[0-9]+}} %[[PTR]], ptr align {{[0-9]+}} @[[ABC15]], i32 15,
// CHECK-NOT: memset
new char[15] { "abc" };
}
@@ -79,17 +79,16 @@ void string_sufficient() {
// CHECK-LABEL: define{{.*}} void @_Z10aggr_exactv
void aggr_exact() {
// CHECK-NOT: icmp
- // CHECK: %[[MEM:.*]] = call noalias noundef nonnull i8* @_Zna{{.}}(i{{32|64}} noundef 16)
- // CHECK: %[[PTR0:.*]] = bitcast i8* %[[MEM]] to %[[AGGR:.*]]*
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR0]], i32 0, i32 0{{$}}
- // CHECK: store i32 1, i32* %[[FIELD]]
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR0]], i32 0, i32 1{{$}}
- // CHECK: store i32 2, i32* %[[FIELD]]
- // CHECK: %[[PTR1:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR0]], i32 1{{$}}
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR1]], i32 0, i32 0{{$}}
- // CHECK: store i32 3, i32* %[[FIELD]]
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR1]], i32 0, i32 1{{$}}
- // CHECK: store i32 0, i32* %[[FIELD]]
+ // CHECK: %[[MEM:.*]] = call noalias noundef nonnull ptr @_Zna{{.}}(i{{32|64}} noundef 16)
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR:.*]], ptr %[[MEM]], i32 0, i32 0{{$}}
+ // CHECK: store i32 1, ptr %[[FIELD]]
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[MEM]], i32 0, i32 1{{$}}
+ // CHECK: store i32 2, ptr %[[FIELD]]
+ // CHECK: %[[PTR1:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[MEM]], i32 1{{$}}
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[PTR1]], i32 0, i32 0{{$}}
+ // CHECK: store i32 3, ptr %[[FIELD]]
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[PTR1]], i32 0, i32 1{{$}}
+ // CHECK: store i32 0, ptr %[[FIELD]]
// CHECK-NOT: store
// CHECK-NOT: memset
struct Aggr { int a, b; };
@@ -99,28 +98,26 @@ void aggr_exact() {
// CHECK-LABEL: define{{.*}} void @_Z15aggr_sufficienti
void aggr_sufficient(int n) {
// CHECK: icmp ult i32 %{{.*}}, 2
- // CHECK: %[[MEM:.*]] = call noalias noundef nonnull i8* @_Zna{{.}}(
- // CHECK: %[[PTR0:.*]] = bitcast i8* %[[MEM]] to %[[AGGR:.*]]*
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR0]], i32 0, i32 0{{$}}
- // CHECK: store i32 1, i32* %[[FIELD]]
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR0]], i32 0, i32 1{{$}}
- // CHECK: store i32 2, i32* %[[FIELD]]
- // CHECK: %[[PTR1:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR0]], i32 1{{$}}
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR1]], i32 0, i32 0{{$}}
- // CHECK: store i32 3, i32* %[[FIELD]]
- // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR1]], i32 0, i32 1{{$}}
- // CHECK: store i32 0, i32* %[[FIELD]]
- // CHECK: %[[PTR2:.*]] = getelementptr inbounds %[[AGGR]], %[[AGGR]]* %[[PTR1]], i32 1{{$}}
+ // CHECK: %[[MEM:.*]] = call noalias noundef nonnull ptr @_Zna{{.}}(
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR:.*]], ptr %[[MEM]], i32 0, i32 0{{$}}
+ // CHECK: store i32 1, ptr %[[FIELD]]
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[MEM]], i32 0, i32 1{{$}}
+ // CHECK: store i32 2, ptr %[[FIELD]]
+ // CHECK: %[[PTR1:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[MEM]], i32 1{{$}}
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[PTR1]], i32 0, i32 0{{$}}
+ // CHECK: store i32 3, ptr %[[FIELD]]
+ // CHECK: %[[FIELD:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[PTR1]], i32 0, i32 1{{$}}
+ // CHECK: store i32 0, ptr %[[FIELD]]
+ // CHECK: %[[PTR2:.*]] = getelementptr inbounds %[[AGGR]], ptr %[[PTR1]], i32 1{{$}}
// CHECK: %[[REMAIN:.*]] = sub i32 {{.*}}, 16
- // CHECK: %[[MEM:.*]] = bitcast %[[AGGR]]* %[[PTR2]] to i8*
- // CHECK: call void @llvm.memset{{.*}}(i8* align {{[0-9]+}} %[[MEM]], i8 0, i32 %[[REMAIN]],
+ // CHECK: call void @llvm.memset{{.*}}(ptr align {{[0-9]+}} %[[PTR2]], i8 0, i32 %[[REMAIN]],
struct Aggr { int a, b; };
new Aggr[n] { 1, 2, 3 };
}
// SIO-LABEL: define{{.*}} void @_Z14constexpr_testv
void constexpr_test() {
- // SIO: call noalias noundef nonnull i8* @_Zna{{.}}(i32 noundef 4)
+ // SIO: call noalias noundef nonnull ptr @_Zna{{.}}(i32 noundef 4)
new int[0+1]{0};
}
diff --git a/clang/test/CodeGenCXX/new-overflow.cpp b/clang/test/CodeGenCXX/new-overflow.cpp
index b7aec385baeb0..9cf1df8d018f0 100644
--- a/clang/test/CodeGenCXX/new-overflow.cpp
+++ b/clang/test/CodeGenCXX/new-overflow.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
// rdar://problem/9246208
@@ -11,13 +11,13 @@ namespace test0 {
typedef A elt;
- // CHECK: define{{.*}} [[A:%.*]]* @_ZN5test04testEs(i16 noundef signext
+ // CHECK: define{{.*}} ptr @_ZN5test04testEs(i16 noundef signext
// CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32
// CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 4)
// CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1
// CHECK-NEXT: [[T2:%.*]] = extractvalue { i32, i1 } [[T0]], 0
// CHECK-NEXT: [[T3:%.*]] = select i1 [[T1]], i32 -1, i32 [[T2]]
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[T3]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[T3]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[N]]
elt *test(short s) {
return new elt[s];
@@ -33,14 +33,14 @@ namespace test1 {
typedef A elt[100];
- // CHECK: define{{.*}} [100 x [[A:%.*]]]* @_ZN5test14testEs(i16 noundef signext
+ // CHECK: define{{.*}} ptr @_ZN5test14testEs(i16 noundef signext
// CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32
// CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 400)
// CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1
// CHECK-NEXT: [[T2:%.*]] = extractvalue { i32, i1 } [[T0]], 0
// CHECK-NEXT: [[T3:%.*]] = mul i32 [[N]], 100
// CHECK-NEXT: [[T4:%.*]] = select i1 [[T1]], i32 -1, i32 [[T2]]
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[T4]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[T4]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[T3]]
elt *test(short s) {
return new elt[s];
@@ -57,7 +57,7 @@ namespace test2 {
typedef A elt[100];
- // CHECK: define{{.*}} [100 x [[A:%.*]]]* @_ZN5test24testEs(i16 noundef signext
+ // CHECK: define{{.*}} ptr @_ZN5test24testEs(i16 noundef signext
// CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32
// CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 400)
// CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1
@@ -68,7 +68,7 @@ namespace test2 {
// CHECK-NEXT: [[T6:%.*]] = or i1 [[T1]], [[T5]]
// CHECK-NEXT: [[T7:%.*]] = extractvalue { i32, i1 } [[T4]], 0
// CHECK-NEXT: [[T8:%.*]] = select i1 [[T6]], i32 -1, i32 [[T7]]
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[T8]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[T8]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[T3]]
elt *test(short s) {
return new elt[s];
@@ -83,9 +83,9 @@ namespace test4 {
typedef A elt;
- // CHECK: define{{.*}} [[A:%.*]]* @_ZN5test44testEs(i16 noundef signext
+ // CHECK: define{{.*}} ptr @_ZN5test44testEs(i16 noundef signext
// CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[N]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[N]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[N]]
elt *test(short s) {
return new elt[s];
@@ -100,9 +100,9 @@ namespace test5 {
typedef A elt;
- // CHECK: define{{.*}} [[A:%.*]]* @_ZN5test54testEi(i32
- // CHECK: [[N:%.*]] = load i32, i32*
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[N]])
+ // CHECK: define{{.*}} ptr @_ZN5test54testEi(i32
+ // CHECK: [[N:%.*]] = load i32, ptr
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[N]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[N]]
elt *test(int s) {
return new elt[s];
@@ -118,13 +118,13 @@ namespace test6 {
typedef A elt;
- // CHECK: define{{.*}} [[A:%.*]]* @_ZN5test64testEt(i16 noundef zeroext
+ // CHECK: define{{.*}} ptr @_ZN5test64testEt(i16 noundef zeroext
// CHECK: [[N:%.*]] = zext i16 {{%.*}} to i32
// CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 4)
// CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1
// CHECK-NEXT: [[T2:%.*]] = extractvalue { i32, i1 } [[T0]], 0
// CHECK-NEXT: [[T3:%.*]] = select i1 [[T1]], i32 -1, i32 [[T2]]
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[T3]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[T3]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[N]]
elt *test(unsigned short s) {
return new elt[s];
@@ -140,14 +140,14 @@ namespace test7 {
typedef A elt[100];
- // CHECK: define{{.*}} [100 x [[A:%.*]]]* @_ZN5test74testEt(i16 noundef zeroext
+ // CHECK: define{{.*}} ptr @_ZN5test74testEt(i16 noundef zeroext
// CHECK: [[N:%.*]] = zext i16 {{%.*}} to i32
// CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 400)
// CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1
// CHECK-NEXT: [[T2:%.*]] = extractvalue { i32, i1 } [[T0]], 0
// CHECK-NEXT: [[T3:%.*]] = mul i32 [[N]], 100
// CHECK-NEXT: [[T4:%.*]] = select i1 [[T1]], i32 -1, i32 [[T2]]
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[T4]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[T4]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[T3]]
elt *test(unsigned short s) {
return new elt[s];
@@ -163,14 +163,14 @@ namespace test8 {
typedef A elt;
- // CHECK: define{{.*}} [[A:%.*]]* @_ZN5test84testEx(i64
- // CHECK: [[N:%.*]] = load i64, i64*
+ // CHECK: define{{.*}} ptr @_ZN5test84testEx(i64
+ // CHECK: [[N:%.*]] = load i64, ptr
// CHECK-NEXT: [[T1:%.*]] = trunc i64 [[N]] to i32
// CHECK-NEXT: [[T2:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[T1]], i32 4)
// CHECK-NEXT: [[T3:%.*]] = extractvalue { i32, i1 } [[T2]], 1
// CHECK-NEXT: [[T5:%.*]] = extractvalue { i32, i1 } [[T2]], 0
// CHECK-NEXT: [[T6:%.*]] = select i1 [[T3]], i32 -1, i32 [[T5]]
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[T6]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[T6]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[T1]]
elt *test(long long s) {
return new elt[s];
@@ -186,14 +186,14 @@ namespace test9 {
typedef A elt;
- // CHECK: define{{.*}} [[A:%.*]]* @_ZN5test94testEy(i64
- // CHECK: [[N:%.*]] = load i64, i64*
+ // CHECK: define{{.*}} ptr @_ZN5test94testEy(i64
+ // CHECK: [[N:%.*]] = load i64, ptr
// CHECK-NEXT: [[T1:%.*]] = trunc i64 [[N]] to i32
// CHECK-NEXT: [[T2:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[T1]], i32 4)
// CHECK-NEXT: [[T3:%.*]] = extractvalue { i32, i1 } [[T2]], 1
// CHECK-NEXT: [[T5:%.*]] = extractvalue { i32, i1 } [[T2]], 0
// CHECK-NEXT: [[T6:%.*]] = select i1 [[T3]], i32 -1, i32 [[T5]]
- // CHECK-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[T6]])
+ // CHECK-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[T6]])
// CHECK: getelementptr inbounds {{.*}}, i32 [[T1]]
elt *test(unsigned long long s) {
return new elt[s];
diff --git a/clang/test/CodeGenCXX/new.cpp b/clang/test/CodeGenCXX/new.cpp
index 14cb5ca75dc0c..e278d9acfe9ee 100644
--- a/clang/test/CodeGenCXX/new.cpp
+++ b/clang/test/CodeGenCXX/new.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s
typedef __typeof__(sizeof(0)) size_t;
@@ -14,10 +14,10 @@ void t1() {
delete [] new int [3];
}
-// CHECK: declare noundef nonnull i8* @_Znwm(i64 noundef) [[ATTR_NOBUILTIN:#[^ ]*]]
-// CHECK: declare void @_ZdlPv(i8* noundef) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]]
-// CHECK: declare noundef nonnull i8* @_Znam(i64 noundef) [[ATTR_NOBUILTIN]]
-// CHECK: declare void @_ZdaPv(i8* noundef) [[ATTR_NOBUILTIN_NOUNWIND]]
+// CHECK: declare noundef nonnull ptr @_Znwm(i64 noundef) [[ATTR_NOBUILTIN:#[^ ]*]]
+// CHECK: declare void @_ZdlPv(ptr noundef) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]]
+// CHECK: declare noundef nonnull ptr @_Znam(i64 noundef) [[ATTR_NOBUILTIN]]
+// CHECK: declare void @_ZdaPv(ptr noundef) [[ATTR_NOBUILTIN_NOUNWIND]]
namespace std {
struct nothrow_t {};
@@ -127,16 +127,16 @@ struct B { int a; };
struct Bmemptr { int Bmemptr::* memptr; int a; };
void t11(int n) {
- // CHECK: call noalias noundef nonnull i8* @_Znwm
- // CHECK: call void @llvm.memset.p0i8.i64(
+ // CHECK: call noalias noundef nonnull ptr @_Znwm
+ // CHECK: call void @llvm.memset.p0.i64(
B* b = new B();
- // CHECK: call noalias noundef nonnull i8* @_Znam
- // CHECK: {{call void.*llvm.memset.p0i8.i64.*i8 0, i64 %}}
+ // CHECK: call noalias noundef nonnull ptr @_Znam
+ // CHECK: {{call void.*llvm.memset.p0.i64.*i8 0, i64 %}}
B *b2 = new B[n]();
- // CHECK: call noalias noundef nonnull i8* @_Znam
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+ // CHECK: call noalias noundef nonnull ptr @_Znam
+ // CHECK: call void @llvm.memcpy.p0.p0.i64
// CHECK: br
Bmemptr *b_memptr = new Bmemptr[n]();
@@ -148,11 +148,11 @@ struct Empty { };
// We don't need to initialize an empty class.
// CHECK-LABEL: define{{.*}} void @_Z3t12v
void t12() {
- // CHECK: call noalias noundef nonnull i8* @_Znam
+ // CHECK: call noalias noundef nonnull ptr @_Znam
// CHECK-NOT: br
(void)new Empty[10];
- // CHECK: call noalias noundef nonnull i8* @_Znam
+ // CHECK: call noalias noundef nonnull ptr @_Znam
// CHECK-NOT: br
(void)new Empty[10]();
@@ -162,12 +162,12 @@ void t12() {
// Zero-initialization
// CHECK-LABEL: define{{.*}} void @_Z3t13i
void t13(int n) {
- // CHECK: call noalias noundef nonnull i8* @_Znwm
- // CHECK: store i32 0, i32*
+ // CHECK: call noalias noundef nonnull ptr @_Znwm
+ // CHECK: store i32 0, ptr
(void)new int();
- // CHECK: call noalias noundef nonnull i8* @_Znam
- // CHECK: {{call void.*llvm.memset.p0i8.i64.*i8 0, i64 %}}
+ // CHECK: call noalias noundef nonnull ptr @_Znam
+ // CHECK: {{call void.*llvm.memset.p0.i64.*i8 0, i64 %}}
(void)new int[n]();
// CHECK-NEXT: ret void
@@ -182,17 +182,17 @@ struct Alloc{
};
void f() {
- // CHECK: call noundef i8* @_ZN5AllocnaEm(i64 noundef 808)
+ // CHECK: call noundef ptr @_ZN5AllocnaEm(i64 noundef 808)
// CHECK: store i64 200
// CHECK: call void @_ZN5AllocD1Ev(
- // CHECK: call void @_ZN5AllocdaEPv(i8*
+ // CHECK: call void @_ZN5AllocdaEPv(ptr
delete[] new Alloc[10][20];
- // CHECK: [[P:%.*]] = call noundef nonnull i8* @_ZN5AllocnaEmRKSt9nothrow_t(i64 noundef 808, {{.*}}) [[ATTR_NOUNWIND:#[^ ]*]]
- // CHECK-NOT: icmp eq i8* [[P]], null
+ // CHECK: [[P:%.*]] = call noundef nonnull ptr @_ZN5AllocnaEmRKSt9nothrow_t(i64 noundef 808, {{.*}}) [[ATTR_NOUNWIND:#[^ ]*]]
+ // CHECK-NOT: icmp eq ptr [[P]], null
// CHECK: store i64 200
delete[] new (nothrow) Alloc[10][20];
- // CHECK: call noalias noundef nonnull i8* @_Znwm
- // CHECK: call void @_ZdlPv(i8*
+ // CHECK: call noalias noundef nonnull ptr @_Znwm
+ // CHECK: call void @_ZdlPv(ptr
delete new bool;
// CHECK: ret void
}
@@ -201,55 +201,51 @@ namespace test15 {
struct A { A(); ~A(); };
// CHECK-LABEL: define{{.*}} void @_ZN6test156test0aEPv(
- // CHECK: [[P:%.*]] = load i8*, i8**
- // CHECK-NOT: icmp eq i8* [[P]], null
+ // CHECK: [[P:%.*]] = load ptr, ptr
+ // CHECK-NOT: icmp eq ptr [[P]], null
// CHECK-NOT: br i1
- // CHECK: [[T0:%.*]] = bitcast i8* [[P]] to [[A:%.*]]*
- // CHECK-NEXT: call void @_ZN6test151AC1Ev([[A]]* {{[^,]*}} [[T0]])
+ // CHECK-NEXT: call void @_ZN6test151AC1Ev(ptr {{[^,]*}} [[P]])
void test0a(void *p) {
new (p) A();
}
// CHECK-LABEL: define{{.*}} void @_ZN6test156test0bEPv(
- // CHECK: [[P0:%.*]] = load i8*, i8**
- // CHECK: [[P:%.*]] = call noundef i8* @_ZnwmPvb(i64 noundef 1, i8* noundef [[P0]]
- // CHECK-NEXT: icmp eq i8* [[P]], null
+ // CHECK: [[P0:%.*]] = load ptr, ptr
+ // CHECK: [[P:%.*]] = call noundef ptr @_ZnwmPvb(i64 noundef 1, ptr noundef [[P0]]
+ // CHECK-NEXT: icmp eq ptr [[P]], null
// CHECK-NEXT: br i1
- // CHECK: [[T0:%.*]] = bitcast i8* [[P]] to [[A:%.*]]*
- // CHECK-NEXT: call void @_ZN6test151AC1Ev([[A]]* {{[^,]*}} [[T0]])
+ // CHECK: call void @_ZN6test151AC1Ev(ptr {{[^,]*}} [[P]])
void test0b(void *p) {
new (p, true) A();
}
// CHECK-LABEL: define{{.*}} void @_ZN6test156test1aEPv(
- // CHECK: [[P:%.*]] = load i8*, i8**
- // CHECK-NOT: icmp eq i8* [[P]], null
+ // CHECK: [[P:%.*]] = load ptr, ptr
+ // CHECK-NOT: icmp eq ptr [[P]], null
// CHECK-NOT: br i1
- // CHECK: [[BEGIN:%.*]] = bitcast i8* [[P]] to [[A:%.*]]*
- // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 5
+ // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A:.*]], ptr [[P]], i64 5
// CHECK-NEXT: br label
- // CHECK: [[CUR:%.*]] = phi [[A]]* [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
- // CHECK-NEXT: call void @_ZN6test151AC1Ev([[A]]* {{[^,]*}} [[CUR]])
- // CHECK-NEXT: [[NEXT]] = getelementptr inbounds [[A]], [[A]]* [[CUR]], i64 1
- // CHECK-NEXT: [[DONE:%.*]] = icmp eq [[A]]* [[NEXT]], [[END]]
+ // CHECK: [[CUR:%.*]] = phi ptr [ [[P]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
+ // CHECK-NEXT: call void @_ZN6test151AC1Ev(ptr {{[^,]*}} [[CUR]])
+ // CHECK-NEXT: [[NEXT]] = getelementptr inbounds [[A]], ptr [[CUR]], i64 1
+ // CHECK-NEXT: [[DONE:%.*]] = icmp eq ptr [[NEXT]], [[END]]
// CHECK-NEXT: br i1 [[DONE]]
void test1a(void *p) {
new (p) A[5];
}
// CHECK-LABEL: define{{.*}} void @_ZN6test156test1bEPv(
- // CHECK: [[P0:%.*]] = load i8*, i8**
- // CHECK: [[P:%.*]] = call noundef i8* @_ZnamPvb(i64 noundef 13, i8* noundef [[P0]]
- // CHECK-NEXT: icmp eq i8* [[P]], null
+ // CHECK: [[P0:%.*]] = load ptr, ptr
+ // CHECK: [[P:%.*]] = call noundef ptr @_ZnamPvb(i64 noundef 13, ptr noundef [[P0]]
+ // CHECK-NEXT: icmp eq ptr [[P]], null
// CHECK-NEXT: br i1
- // CHECK: [[AFTER_COOKIE:%.*]] = getelementptr inbounds i8, i8* [[P]], i64 8
- // CHECK: [[BEGIN:%.*]] = bitcast i8* [[AFTER_COOKIE]] to [[A:%.*]]*
- // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 5
+ // CHECK: [[AFTER_COOKIE:%.*]] = getelementptr inbounds i8, ptr [[P]], i64 8
+ // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], ptr [[AFTER_COOKIE]], i64 5
// CHECK-NEXT: br label
- // CHECK: [[CUR:%.*]] = phi [[A]]* [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
- // CHECK-NEXT: call void @_ZN6test151AC1Ev([[A]]* {{[^,]*}} [[CUR]])
- // CHECK-NEXT: [[NEXT]] = getelementptr inbounds [[A]], [[A]]* [[CUR]], i64 1
- // CHECK-NEXT: [[DONE:%.*]] = icmp eq [[A]]* [[NEXT]], [[END]]
+ // CHECK: [[CUR:%.*]] = phi ptr [ [[AFTER_COOKIE]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
+ // CHECK-NEXT: call void @_ZN6test151AC1Ev(ptr {{[^,]*}} [[CUR]])
+ // CHECK-NEXT: [[NEXT]] = getelementptr inbounds [[A]], ptr [[CUR]], i64 1
+ // CHECK-NEXT: [[DONE:%.*]] = icmp eq ptr [[NEXT]], [[END]]
// CHECK-NEXT: br i1 [[DONE]]
void test1b(void *p) {
new (p, true) A[5];
@@ -258,16 +254,15 @@ namespace test15 {
// TODO: it's okay if all these size calculations get dropped.
// FIXME: maybe we should try to throw on overflow?
// CHECK-LABEL: define{{.*}} void @_ZN6test155test2EPvi(
- // CHECK: [[N:%.*]] = load i32, i32*
+ // CHECK: [[N:%.*]] = load i32, ptr
// CHECK-NEXT: [[T0:%.*]] = sext i32 [[N]] to i64
- // CHECK-NEXT: [[P:%.*]] = load i8*, i8**
- // CHECK: [[BEGIN:%.*]] = bitcast i8* [[P]] to [[A:%.*]]*
+ // CHECK-NEXT: [[P:%.*]] = load ptr, ptr
// CHECK-NEXT: [[ISEMPTY:%.*]] = icmp eq i64 [[T0]], 0
// CHECK-NEXT: br i1 [[ISEMPTY]],
- // CHECK: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 [[T0]]
+ // CHECK: [[END:%.*]] = getelementptr inbounds [[A]], ptr [[P]], i64 [[T0]]
// CHECK-NEXT: br label
- // CHECK: [[CUR:%.*]] = phi [[A]]* [ [[BEGIN]],
- // CHECK-NEXT: call void @_ZN6test151AC1Ev([[A]]* {{[^,]*}} [[CUR]])
+ // CHECK: [[CUR:%.*]] = phi ptr [ [[P]],
+ // CHECK-NEXT: call void @_ZN6test151AC1Ev(ptr {{[^,]*}} [[CUR]])
void test2(void *p, int n) {
new (p) A[n];
}
@@ -277,8 +272,7 @@ namespace PR10197 {
// CHECK-LABEL: define weak_odr void @_ZN7PR101971fIiEEvv()
template<typename T>
void f() {
- // CHECK: [[CALL:%.*]] = call noalias noundef nonnull i8* @_Znwm
- // CHECK-NEXT: [[CASTED:%.*]] = bitcast i8* [[CALL]] to
+ // CHECK: [[CALL:%.*]] = call noalias noundef nonnull ptr @_Znwm
new T;
// CHECK-NEXT: ret void
}
@@ -289,7 +283,7 @@ namespace PR10197 {
namespace PR11523 {
class MyClass;
typedef int MyClass::* NewTy;
- // CHECK-LABEL: define{{.*}} i64* @_ZN7PR115231fEv
+ // CHECK-LABEL: define{{.*}} ptr @_ZN7PR115231fEv
// CHECK: store i64 -1
NewTy* f() { return new NewTy[2](); }
}
@@ -299,18 +293,16 @@ namespace PR11757 {
struct X { X(); X(const X&); };
X* a(X* x) { return new X(X()); }
// CHECK: define {{.*}} @_ZN7PR117571aEPNS_1XE
- // CHECK: [[CALL:%.*]] = call noalias noundef nonnull i8* @_Znwm
- // CHECK-NEXT: [[CASTED:%.*]] = bitcast i8* [[CALL]] to
- // CHECK-NEXT: call void @_ZN7PR117571XC1Ev({{.*}}* {{[^,]*}} [[CASTED]])
- // CHECK-NEXT: ret {{.*}} [[CASTED]]
+ // CHECK: [[CALL:%.*]] = call noalias noundef nonnull ptr @_Znwm
+ // CHECK: ret {{.*}} [[CALL]]
}
namespace PR13380 {
struct A { A() {} };
struct B : public A { int x; };
- // CHECK-LABEL: define{{.*}} i8* @_ZN7PR133801fEv
- // CHECK: call noalias noundef nonnull i8* @_Znam(
- // CHECK: call void @llvm.memset.p0i8
+ // CHECK-LABEL: define{{.*}} ptr @_ZN7PR133801fEv
+ // CHECK: call noalias noundef nonnull ptr @_Znam(
+ // CHECK: call void @llvm.memset.p0
// CHECK-NEXT: call void @_ZN7PR133801BC1Ev
void* f() { return new B[2](); }
}
@@ -323,40 +315,40 @@ namespace N3664 {
// CHECK-LABEL: define{{.*}} void @_ZN5N36641fEv
void f() {
- // CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
+ // CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
int *p = new int; // expected-note {{allocated with 'new' here}}
// CHECK: call void @_ZdlPv({{.*}}) [[ATTR_BUILTIN_DELETE:#[^ ]*]]
delete p;
- // CHECK: call noalias noundef nonnull i8* @_Znam(i64 noundef 12) [[ATTR_BUILTIN_NEW]]
+ // CHECK: call noalias noundef nonnull ptr @_Znam(i64 noundef 12) [[ATTR_BUILTIN_NEW]]
int *q = new int[3];
// CHECK: call void @_ZdaPv({{.*}}) [[ATTR_BUILTIN_DELETE]]
delete[] p; // expected-warning {{'delete[]' applied to a pointer that was allocated with 'new'; did you mean 'delete'?}}
- // CHECK: call noalias noundef i8* @_ZnamRKSt9nothrow_t(i64 noundef 3, {{.*}}) [[ATTR_NOBUILTIN_NOUNWIND_ALLOCSIZE:#[^ ]*]]
+ // CHECK: call noalias noundef ptr @_ZnamRKSt9nothrow_t(i64 noundef 3, {{.*}}) [[ATTR_NOBUILTIN_NOUNWIND_ALLOCSIZE:#[^ ]*]]
(void) new (nothrow) S[3];
- // CHECK: call noundef i8* @_Znwm15MyPlacementType(i64 noundef 4){{$}}
+ // CHECK: call noundef ptr @_Znwm15MyPlacementType(i64 noundef 4){{$}}
(void) new (mpt) int;
}
- // CHECK: declare noundef i8* @_ZnamRKSt9nothrow_t(i64 noundef, {{.*}}) [[ATTR_NOBUILTIN_NOUNWIND_ALLOCSIZE:#[^ ]*]]
+ // CHECK: declare noundef ptr @_ZnamRKSt9nothrow_t(i64 noundef, {{.*}}) [[ATTR_NOBUILTIN_NOUNWIND_ALLOCSIZE:#[^ ]*]]
// CHECK-LABEL: define{{.*}} void @_ZN5N36641gEv
void g() {
// It's OK for there to be attributes here, so long as we don't have a
// 'builtin' attribute.
- // CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4) {{#[^ ]*}}{{$}}
+ // CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) {{#[^ ]*}}{{$}}
int *p = (int*)operator new(4);
// CHECK: call void @_ZdlPv({{.*}}) [[ATTR_NOUNWIND:#[^ ]*]]
operator delete(p);
- // CHECK: call noalias noundef nonnull i8* @_Znam(i64 noundef 12) {{#[^ ]*}}{{$}}
+ // CHECK: call noalias noundef nonnull ptr @_Znam(i64 noundef 12) {{#[^ ]*}}{{$}}
int *q = (int*)operator new[](12);
// CHECK: call void @_ZdaPv({{.*}}) [[ATTR_NOUNWIND]]
operator delete [](p);
- // CHECK: call noalias noundef i8* @_ZnamRKSt9nothrow_t(i64 noundef 3, {{.*}}) [[ATTR_NOUNWIND_ALLOCSIZE:#[^ ]*]]
+ // CHECK: call noalias noundef ptr @_ZnamRKSt9nothrow_t(i64 noundef 3, {{.*}}) [[ATTR_NOUNWIND_ALLOCSIZE:#[^ ]*]]
(void) operator new[](3, nothrow);
}
}
@@ -364,7 +356,7 @@ namespace N3664 {
namespace builtins {
// CHECK-LABEL: define{{.*}} void @_ZN8builtins1fEv
void f() {
- // CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW]]
+ // CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW]]
// CHECK: call void @_ZdlPv({{.*}}) [[ATTR_BUILTIN_DELETE]]
__builtin_operator_delete(__builtin_operator_new(4));
}
diff --git a/clang/test/CodeGenCXX/no-odr-use.cpp b/clang/test/CodeGenCXX/no-odr-use.cpp
index 4b5e6b1e3f61f..8c1e3415b9941 100644
--- a/clang/test/CodeGenCXX/no-odr-use.cpp
+++ b/clang/test/CodeGenCXX/no-odr-use.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm -o - -triple x86_64-linux-gnu %s | FileCheck %s --check-prefixes=CHECK,CHECK-CXX11
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++2a -emit-llvm -o - -triple x86_64-linux-gnu %s | FileCheck %s --check-prefixes=CHECK,CHECK-CXX2A
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - -triple x86_64-linux-gnu %s | FileCheck %s --check-prefixes=CHECK,CHECK-CXX11
+// RUN: %clang_cc1 -std=c++2a -emit-llvm -o - -triple x86_64-linux-gnu %s | FileCheck %s --check-prefixes=CHECK,CHECK-CXX2A
// CHECK-DAG: @__const._Z1fi.a = private unnamed_addr constant {{.*}} { i32 1, [2 x i32] [i32 2, i32 3], [3 x i32] [i32 4, i32 5, i32 6] }
// CHECK-CXX11-DAG: @_ZN7PR422765State1mE.const = private unnamed_addr constant [2 x { i64, i64 }] [{ {{.*}} @_ZN7PR422765State2f1Ev {{.*}}, i64 0 }, { {{.*}} @_ZN7PR422765State2f2Ev {{.*}}, i64 0 }]
@@ -15,15 +15,14 @@ int f(int i) {
return [] (int n, int A::*p) {
// CHECK: br i1
return (n >= 0
- // CHECK: getelementptr inbounds [3 x i32], [3 x i32]* getelementptr inbounds ({{.*}} @__const._Z1fi.a, i32 0, i32 2), i64 0, i64 %
+ // CHECK: getelementptr inbounds [3 x i32], ptr getelementptr inbounds ({{.*}} @__const._Z1fi.a, i32 0, i32 2), i64 0, i64 %
? a.arr[n]
// CHECK: br i1
: (n == -1
- // CHECK: getelementptr inbounds i8, i8* bitcast ({{.*}} @__const._Z1fi.a to i8*), i64 %
- // CHECK: bitcast i8* %{{.*}} to i32*
+ // CHECK: getelementptr inbounds i8, ptr @__const._Z1fi.a, i64 %
// CHECK: load i32
? a.*p
- // CHECK: getelementptr inbounds [2 x i32], [2 x i32]* getelementptr inbounds ({{.*}} @__const._Z1fi.a, i32 0, i32 1), i64 0, i64 %
+ // CHECK: getelementptr inbounds [2 x i32], ptr getelementptr inbounds ({{.*}} @__const._Z1fi.a, i32 0, i32 1), i64 0, i64 %
// CHECK: load i32
: a.y[2 - n]));
}(i, &A::x);
@@ -39,8 +38,8 @@ namespace PR42276 {
// CHECK-LABEL: define{{.*}} void @_ZN7PR422765State16syncDirtyObjectsEv(
void State::syncDirtyObjects() {
for (int i = 0; i < sizeof(m) / sizeof(m[0]); ++i)
- // CHECK-CXX11: getelementptr inbounds [2 x { i64, i64 }], [2 x { i64, i64 }]* @_ZN7PR422765State1mE.const, i64 0, i64 %
- // CHECK-CXX2A: getelementptr inbounds [2 x { i64, i64 }], [2 x { i64, i64 }]* @_ZN7PR422765State1mE, i64 0, i64 %
+ // CHECK-CXX11: getelementptr inbounds [2 x { i64, i64 }], ptr @_ZN7PR422765State1mE.const, i64 0, i64 %
+ // CHECK-CXX2A: getelementptr inbounds [2 x { i64, i64 }], ptr @_ZN7PR422765State1mE, i64 0, i64 %
(this->*m[i])();
}
}
diff --git a/clang/test/CodeGenCXX/no-unique-address.cpp b/clang/test/CodeGenCXX/no-unique-address.cpp
index c0678aca5b0c8..aa58b87555dcc 100644
--- a/clang/test/CodeGenCXX/no-unique-address.cpp
+++ b/clang/test/CodeGenCXX/no-unique-address.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++2a %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++2a %s -emit-llvm -o - -triple x86_64-linux-gnu -O2 -disable-llvm-passes | FileCheck %s --check-prefix=CHECK-OPT
+// RUN: %clang_cc1 -std=c++2a %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -std=c++2a %s -emit-llvm -o - -triple x86_64-linux-gnu -O2 -disable-llvm-passes | FileCheck %s --check-prefix=CHECK-OPT
struct A { ~A(); int n; char c[3]; };
struct B { [[no_unique_address]] A a; char k; };
@@ -62,21 +62,18 @@ static_assert(sizeof(FieldOverlap) == 4);
// CHECK-DAG: @fo ={{.*}} global %{{[^ ]*}} { i32 1234 }
FieldOverlap fo = {{}, {}, {}, {}, 1234};
-// CHECK-DAG: @e1 ={{.*}} constant %[[E1:[^ ]*]]* bitcast (%[[FO:[^ ]*]]* @fo to %[[E1]]*)
+// CHECK-DAG: @e1 ={{.*}} constant ptr @fo
Empty1 &e1 = fo.e1;
-// CHECK-DAG: @e2 ={{.*}} constant %[[E1]]* bitcast (i8* getelementptr (i8, i8* bitcast (%[[FO]]* @fo to i8*), i64 1) to %[[E1]]*)
+// CHECK-DAG: @e2 ={{.*}} constant ptr getelementptr inbounds (i8, ptr @fo, i64 1)
Empty1 &e2 = fo.e2;
// CHECK-LABEL: accessE1
-// CHECK: %[[RET:.*]] = bitcast %[[FO]]* %{{.*}} to %[[E1]]*
-// CHECK: ret %[[E1]]* %[[RET]]
+// CHECK: ret ptr %{{.*}}
Empty1 &accessE1(FieldOverlap &fo) { return fo.e1; }
// CHECK-LABEL: accessE2
-// CHECK: %[[AS_I8:.*]] = bitcast %[[FO]]* %{{.*}} to i8*
-// CHECK: %[[ADJUSTED:.*]] = getelementptr inbounds i8, i8* %[[AS_I8]], i64 1
-// CHECK: %[[RET:.*]] = bitcast i8* %[[ADJUSTED]] to %[[E1]]*
-// CHECK: ret %[[E1]]* %[[RET]]
+// CHECK: %[[ADJUSTED:.*]] = getelementptr inbounds i8, ptr %{{.*}}, i64 1
+// CHECK: ret ptr %[[ADJUSTED]]
Empty1 &accessE2(FieldOverlap &fo) { return fo.e2; }
struct LaterDeclaredFieldHasLowerOffset {
diff --git a/clang/test/CodeGenCXX/noescape.cpp b/clang/test/CodeGenCXX/noescape.cpp
index 0e69cfb50094d..c4968ffec1aa1 100644
--- a/clang/test/CodeGenCXX/noescape.cpp
+++ b/clang/test/CodeGenCXX/noescape.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm -fblocks -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -fblocks -o - %s | FileCheck %s
struct S {
int a[4];
@@ -8,26 +8,26 @@ struct S {
virtual void vm1(int *, int * __attribute__((noescape)));
};
-// CHECK: define{{.*}} void @_ZN1SC2EPiS0_(%struct.S* {{.*}}, {{.*}}, {{.*}} nocapture noundef {{%.*}})
-// CHECK: define{{.*}} void @_ZN1SC1EPiS0_(%struct.S* {{.*}}, {{.*}}, {{.*}} nocapture noundef {{%.*}}) {{.*}} {
-// CHECK: call void @_ZN1SC2EPiS0_(%struct.S* {{.*}}, {{.*}}, {{.*}} nocapture {{.*}})
+// CHECK: define{{.*}} void @_ZN1SC2EPiS0_(ptr {{.*}}, {{.*}}, {{.*}} nocapture noundef {{%.*}})
+// CHECK: define{{.*}} void @_ZN1SC1EPiS0_(ptr {{.*}}, {{.*}}, {{.*}} nocapture noundef {{%.*}}) {{.*}} {
+// CHECK: call void @_ZN1SC2EPiS0_(ptr {{.*}}, {{.*}}, {{.*}} nocapture {{.*}})
S::S(int *, int * __attribute__((noescape))) {}
-// CHECK: define {{.*}} %struct.S* @_ZN1SaSEPi(%struct.S* {{.*}}, {{.*}} nocapture noundef {{%.*}})
+// CHECK: define {{.*}} ptr @_ZN1SaSEPi(ptr {{.*}}, {{.*}} nocapture noundef {{%.*}})
S &S::operator=(int * __attribute__((noescape))) { return *this; }
-// CHECK: define{{.*}} void @_ZN1S2m0EPiS0_(%struct.S* {{.*}}, {{.*}} nocapture noundef {{%.*}})
+// CHECK: define{{.*}} void @_ZN1S2m0EPiS0_(ptr {{.*}}, {{.*}} nocapture noundef {{%.*}})
void S::m0(int *, int * __attribute__((noescape))) {}
-// CHECK: define{{.*}} void @_ZN1S3vm1EPiS0_(%struct.S* {{.*}}, {{.*}} nocapture noundef {{%.*}})
+// CHECK: define{{.*}} void @_ZN1S3vm1EPiS0_(ptr {{.*}}, {{.*}} nocapture noundef {{%.*}})
void S::vm1(int *, int * __attribute__((noescape))) {}
// CHECK-LABEL: define{{.*}} void @_Z5test0P1SPiS1_(
-// CHECK: call void @_ZN1SC1EPiS0_(%struct.S* {{.*}}, {{.*}}, {{.*}} nocapture noundef {{.*}})
-// CHECK: call {{.*}} %struct.S* @_ZN1SaSEPi(%struct.S* {{.*}}, {{.*}} nocapture noundef {{.*}})
-// CHECK: call void @_ZN1S2m0EPiS0_(%struct.S* {{.*}}, {{.*}}, {{.*}} nocapture noundef {{.*}})
-// CHECK: call void {{.*}}(%struct.S* {{.*}}, {{.*}}, {{.*}} nocapture noundef {{.*}})
+// CHECK: call void @_ZN1SC1EPiS0_(ptr {{.*}}, {{.*}}, {{.*}} nocapture noundef {{.*}})
+// CHECK: call {{.*}} ptr @_ZN1SaSEPi(ptr {{.*}}, {{.*}} nocapture noundef {{.*}})
+// CHECK: call void @_ZN1S2m0EPiS0_(ptr {{.*}}, {{.*}}, {{.*}} nocapture noundef {{.*}})
+// CHECK: call void {{.*}}(ptr {{.*}}, {{.*}}, {{.*}} nocapture noundef {{.*}})
void test0(S *s, int *p0, int *p1) {
S t(p0, p1);
t = p1;
@@ -44,7 +44,7 @@ void *operator new(std::size_t, void * __attribute__((noescape)) p) {
return p;
}
-// CHECK-LABEL: define{{.*}} i8* @_Z5test1Pv(
+// CHECK-LABEL: define{{.*}} ptr @_Z5test1Pv(
// CHECK: %call = call {{.*}} @_ZnwmPv({{.*}}, {{.*}} nocapture {{.*}})
void *test1(void *p0) {
return ::operator new(16, p0);
@@ -59,7 +59,7 @@ void test2(int *p0, int *p1) {
}
// CHECK-LABEL: define{{.*}} void @_Z5test3PFvU8noescapePiES_(
-// CHECK: call void {{.*}}(i32* nocapture noundef {{.*}})
+// CHECK: call void {{.*}}(ptr nocapture noundef {{.*}})
typedef void (*NoEscapeFunc)(__attribute__((noescape)) int *);
void test3(NoEscapeFunc f, int *p) {
@@ -82,11 +82,11 @@ void noescapefunc(__attribute__((noescape)) BlockTy);
// Check that __block variables with reference types are handled correctly.
// CHECK: define{{.*}} void @_ZN9TestByref4testEv(
-// CHECK: %[[X:.*]] = alloca %[[STRUCT_TESTBYREF:.*]]*, align 8
-// CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %{{.*}}*, %[[STRUCT_TESTBYREF]]* }>, align 8
-// CHECK: %[[BLOCK_CAPTURED:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %{{.*}}*, %[[STRUCT_TESTBYREF]]* }>, <{ i8*, i32, i32, i8*, %{{.*}}*, %[[STRUCT_TESTBYREF]]* }>* %[[BLOCK]], i32 0, i32 5
-// CHECK: %[[V0:.*]] = load %[[STRUCT_TESTBYREF]]*, %[[STRUCT_TESTBYREF]]** %[[X]], align 8
-// CHECK: store %[[STRUCT_TESTBYREF]]* %[[V0]], %[[STRUCT_TESTBYREF]]** %[[BLOCK_CAPTURED]], align 8
+// CHECK: %[[X:.*]] = alloca ptr, align 8
+// CHECK: %[[BLOCK:.*]] = alloca <{ ptr, i32, i32, ptr, ptr, ptr }>, align 8
+// CHECK: %[[BLOCK_CAPTURED:.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr }>, ptr %[[BLOCK]], i32 0, i32 5
+// CHECK: %[[V0:.*]] = load ptr, ptr %[[X]], align 8
+// CHECK: store ptr %[[V0]], ptr %[[BLOCK_CAPTURED]], align 8
void test() {
__block S &x = getS();
diff --git a/clang/test/CodeGenCXX/non-const-init-cxx2a.cpp b/clang/test/CodeGenCXX/non-const-init-cxx2a.cpp
index 79b22664052ca..1ebb595897b31 100644
--- a/clang/test/CodeGenCXX/non-const-init-cxx2a.cpp
+++ b/clang/test/CodeGenCXX/non-const-init-cxx2a.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++2a | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++2a | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -emit-pch -o %t.pch %s -std=c++2a
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -include-pch %t.pch -x c++ /dev/null -emit-llvm -o - -std=c++2a | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-pch -o %t.pch %s -std=c++2a
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -include-pch %t.pch -x c++ /dev/null -emit-llvm -o - -std=c++2a | FileCheck %s
struct B {
constexpr B() {}
@@ -16,4 +16,4 @@ struct B {
B b = B();
// CHECK: define {{.*}}cxx_global_var_init
-// CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN1BD1Ev {{.*}} @b
+// CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN1BD1Ev, {{.*}} @b
diff --git a/clang/test/CodeGenCXX/observe-noexcept.cpp b/clang/test/CodeGenCXX/observe-noexcept.cpp
index 9a279466b3de2..774e8055e1246 100644
--- a/clang/test/CodeGenCXX/observe-noexcept.cpp
+++ b/clang/test/CodeGenCXX/observe-noexcept.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64le-unknown-unknown -std=c++11 -fopenmp -fexceptions -fcxx-exceptions -O0 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -std=c++11 -fopenmp -fexceptions -fcxx-exceptions -O0 -emit-llvm %s -o - | FileCheck %s
// Check that regions that install a terminate scope in the exception stack can
// correctly generate complex arithmetic.
@@ -9,7 +9,7 @@ void ffcomplex (int a) {
// CHECK: call noundef { double, double } @__muldc3(double noundef %{{.+}}, double noundef %{{.+}}, double noundef %{{.+}}, double noundef %{{.+}})
dc *= dc;
- // CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME1:@.*]] to void (i32*, i32*, ...)*), { double, double }* %{{.+}})
+ // CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME1:@.*]], ptr %{{.+}})
#pragma omp parallel
{
dc *= dc;
@@ -32,7 +32,7 @@ void foo(int a, int b) {
void (*fptr)(void) noexcept = fnoexcp;
- // CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME2:@.*]] to void (i32*, i32*, ...)*), void ()** %{{.+}})
+ // CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME2:@.*]], ptr %{{.+}})
#pragma omp parallel
{
fptr();
diff --git a/clang/test/CodeGenCXX/partial-destruction.cpp b/clang/test/CodeGenCXX/partial-destruction.cpp
index 4337b830bf094..840e43880293b 100644
--- a/clang/test/CodeGenCXX/partial-destruction.cpp
+++ b/clang/test/CodeGenCXX/partial-destruction.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++03 | FileCheck %s -check-prefixes=CHECK,CHECKv03
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++11 | FileCheck %s -check-prefixes=CHECK,CHECKv11
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++03 | FileCheck %s -check-prefixes=CHECK,CHECKv03
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++11 | FileCheck %s -check-prefixes=CHECK,CHECKv11
// Test IR generation for partial destruction of aggregates.
@@ -13,85 +13,85 @@ namespace test0 {
opaque();
}
// CHECK-LABEL: define{{.*}} void @_ZN5test04testEv()
- // CHECK-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-SAME: personality ptr @__gxx_personality_v0
// CHECK: [[AS:%.*]] = alloca [10 x [[A:%.*]]], align
- // CHECK-NEXT: [[ENDVAR:%.*]] = alloca [[A]]*
- // CHECK-NEXT: [[EXN:%.*]] = alloca i8*
+ // CHECK-NEXT: [[ENDVAR:%.*]] = alloca ptr
+ // CHECK-NEXT: [[EXN:%.*]] = alloca ptr
// CHECK-NEXT: [[SEL:%.*]] = alloca i32
// Initialize.
- // CHECK-NEXT: [[E_BEGIN:%.*]] = getelementptr inbounds [10 x [[A]]], [10 x [[A]]]* [[AS]], i64 0, i64 0
- // CHECK-NEXT: store [[A]]* [[E_BEGIN]], [[A]]** [[ENDVAR]]
- // CHECK-NEXT: invoke void @_ZN5test01AC1Ei([[A]]* {{[^,]*}} [[E_BEGIN]], i32 noundef 5)
- // CHECK: [[E1:%.*]] = getelementptr inbounds [[A]], [[A]]* [[E_BEGIN]], i64 1
- // CHECK-NEXT: store [[A]]* [[E1]], [[A]]** [[ENDVAR]]
- // CHECK-NEXT: invoke void @_ZN5test01AC1Ei([[A]]* {{[^,]*}} [[E1]], i32 noundef 7)
- // CHECK: [[E2:%.*]] = getelementptr inbounds [[A]], [[A]]* [[E1]], i64 1
- // CHECK-NEXT: store [[A]]* [[E2]], [[A]]** [[ENDVAR]]
- // CHECK-NEXT: [[E_END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[E_BEGIN]], i64 10
+ // CHECK-NEXT: [[E_BEGIN:%.*]] = getelementptr inbounds [10 x [[A]]], ptr [[AS]], i64 0, i64 0
+ // CHECK-NEXT: store ptr [[E_BEGIN]], ptr [[ENDVAR]]
+ // CHECK-NEXT: invoke void @_ZN5test01AC1Ei(ptr {{[^,]*}} [[E_BEGIN]], i32 noundef 5)
+ // CHECK: [[E1:%.*]] = getelementptr inbounds [[A]], ptr [[E_BEGIN]], i64 1
+ // CHECK-NEXT: store ptr [[E1]], ptr [[ENDVAR]]
+ // CHECK-NEXT: invoke void @_ZN5test01AC1Ei(ptr {{[^,]*}} [[E1]], i32 noundef 7)
+ // CHECK: [[E2:%.*]] = getelementptr inbounds [[A]], ptr [[E1]], i64 1
+ // CHECK-NEXT: store ptr [[E2]], ptr [[ENDVAR]]
+ // CHECK-NEXT: [[E_END:%.*]] = getelementptr inbounds [[A]], ptr [[E_BEGIN]], i64 10
// CHECK-NEXT: br label
- // CHECK: [[E_CUR:%.*]] = phi [[A]]* [ [[E2]], {{%.*}} ], [ [[E_NEXT:%.*]], {{%.*}} ]
- // CHECK-NEXT: invoke void @_ZN5test01AC1Ev([[A]]* {{[^,]*}} [[E_CUR]])
- // CHECK: [[E_NEXT]] = getelementptr inbounds [[A]], [[A]]* [[E_CUR]], i64 1
- // CHECK-NEXT: store [[A]]* [[E_NEXT]], [[A]]** [[ENDVAR]]
- // CHECK-NEXT: [[T0:%.*]] = icmp eq [[A]]* [[E_NEXT]], [[E_END]]
+ // CHECK: [[E_CUR:%.*]] = phi ptr [ [[E2]], {{%.*}} ], [ [[E_NEXT:%.*]], {{%.*}} ]
+ // CHECK-NEXT: invoke void @_ZN5test01AC1Ev(ptr {{[^,]*}} [[E_CUR]])
+ // CHECK: [[E_NEXT]] = getelementptr inbounds [[A]], ptr [[E_CUR]], i64 1
+ // CHECK-NEXT: store ptr [[E_NEXT]], ptr [[ENDVAR]]
+ // CHECK-NEXT: [[T0:%.*]] = icmp eq ptr [[E_NEXT]], [[E_END]]
// CHECK-NEXT: br i1 [[T0]],
// Run.
// CHECK: invoke void @_Z6opaquev()
// Normal destroy.
- // CHECK: [[ED_BEGIN:%.*]] = getelementptr inbounds [10 x [[A]]], [10 x [[A]]]* [[AS]], i32 0, i32 0
- // CHECK-NEXT: [[ED_END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[ED_BEGIN]], i64 10
+ // CHECK: [[ED_BEGIN:%.*]] = getelementptr inbounds [10 x [[A]]], ptr [[AS]], i32 0, i32 0
+ // CHECK-NEXT: [[ED_END:%.*]] = getelementptr inbounds [[A]], ptr [[ED_BEGIN]], i64 10
// CHECK-NEXT: br label
- // CHECK: [[ED_AFTER:%.*]] = phi [[A]]* [ [[ED_END]], {{%.*}} ], [ [[ED_CUR:%.*]], {{%.*}} ]
- // CHECK-NEXT: [[ED_CUR]] = getelementptr inbounds [[A]], [[A]]* [[ED_AFTER]], i64 -1
- // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[ED_CUR]])
- // CHECKv11-NEXT: call void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[ED_CUR]])
- // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[ED_CUR]], [[ED_BEGIN]]
+ // CHECK: [[ED_AFTER:%.*]] = phi ptr [ [[ED_END]], {{%.*}} ], [ [[ED_CUR:%.*]], {{%.*}} ]
+ // CHECK-NEXT: [[ED_CUR]] = getelementptr inbounds [[A]], ptr [[ED_AFTER]], i64 -1
+ // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[ED_CUR]])
+ // CHECKv11-NEXT: call void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[ED_CUR]])
+ // CHECK: [[T0:%.*]] = icmp eq ptr [[ED_CUR]], [[ED_BEGIN]]
// CHECK-NEXT: br i1 [[T0]],
// CHECK: ret void
// Partial destroy for initialization.
- // CHECK: landingpad { i8*, i32 }
+ // CHECK: landingpad { ptr, i32 }
// CHECK-NEXT: cleanup
- // CHECK: [[PARTIAL_END:%.*]] = load [[A]]*, [[A]]** [[ENDVAR]]
- // CHECK-NEXT: [[T0:%.*]] = icmp eq [[A]]* [[E_BEGIN]], [[PARTIAL_END]]
+ // CHECK: [[PARTIAL_END:%.*]] = load ptr, ptr [[ENDVAR]]
+ // CHECK-NEXT: [[T0:%.*]] = icmp eq ptr [[E_BEGIN]], [[PARTIAL_END]]
// CHECK-NEXT: br i1 [[T0]],
- // CHECK: [[E_AFTER:%.*]] = phi [[A]]* [ [[PARTIAL_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ]
- // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], [[A]]* [[E_AFTER]], i64 -1
- // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[E_CUR]])
- // CHECKv11-NEXT: call void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[E_CUR]])
- // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[E_CUR]], [[E_BEGIN]]
+ // CHECK: [[E_AFTER:%.*]] = phi ptr [ [[PARTIAL_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ]
+ // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], ptr [[E_AFTER]], i64 -1
+ // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[E_CUR]])
+ // CHECKv11-NEXT: call void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[E_CUR]])
+ // CHECK: [[T0:%.*]] = icmp eq ptr [[E_CUR]], [[E_BEGIN]]
// CHECK-NEXT: br i1 [[T0]],
// Primary EH destructor.
- // CHECK: landingpad { i8*, i32 }
+ // CHECK: landingpad { ptr, i32 }
// CHECK-NEXT: cleanup
- // CHECK: [[E0:%.*]] = getelementptr inbounds [10 x [[A]]], [10 x [[A]]]* [[AS]], i32 0, i32 0
- // CHECK-NEXT: [[E_END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[E0]], i64 10
+ // CHECK: [[E0:%.*]] = getelementptr inbounds [10 x [[A]]], ptr [[AS]], i32 0, i32 0
+ // CHECK-NEXT: [[E_END:%.*]] = getelementptr inbounds [[A]], ptr [[E0]], i64 10
// CHECK-NEXT: br label
// Partial destructor for primary normal destructor.
// FIXME: There's some really bad block ordering here which causes
// the partial destroy for the primary normal destructor to fall
// within the primary EH destructor.
- // CHECKv03: landingpad { i8*, i32 }
+ // CHECKv03: landingpad { ptr, i32 }
// CHECKv03-NEXT: cleanup
- // CHECKv03: [[T0:%.*]] = icmp eq [[A]]* [[ED_BEGIN]], [[ED_CUR]]
+ // CHECKv03: [[T0:%.*]] = icmp eq ptr [[ED_BEGIN]], [[ED_CUR]]
// CHECKv03-NEXT: br i1 [[T0]]
- // CHECKv03: [[EDD_AFTER:%.*]] = phi [[A]]* [ [[ED_CUR]], {{%.*}} ], [ [[EDD_CUR:%.*]], {{%.*}} ]
- // CHECKv03-NEXT: [[EDD_CUR]] = getelementptr inbounds [[A]], [[A]]* [[EDD_AFTER]], i64 -1
- // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[EDD_CUR]])
- // CHECKv03: [[T0:%.*]] = icmp eq [[A]]* [[EDD_CUR]], [[ED_BEGIN]]
+ // CHECKv03: [[EDD_AFTER:%.*]] = phi ptr [ [[ED_CUR]], {{%.*}} ], [ [[EDD_CUR:%.*]], {{%.*}} ]
+ // CHECKv03-NEXT: [[EDD_CUR]] = getelementptr inbounds [[A]], ptr [[EDD_AFTER]], i64 -1
+ // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[EDD_CUR]])
+ // CHECKv03: [[T0:%.*]] = icmp eq ptr [[EDD_CUR]], [[ED_BEGIN]]
// CHECKv03-NEXT: br i1 [[T0]]
// Back to the primary EH destructor.
- // CHECK: [[E_AFTER:%.*]] = phi [[A]]* [ [[E_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ]
- // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], [[A]]* [[E_AFTER]], i64 -1
- // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[E_CUR]])
- // CHECKv11-NEXT: call void @_ZN5test01AD1Ev([[A]]* {{[^,]*}} [[E_CUR]])
- // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[E_CUR]], [[E0]]
+ // CHECK: [[E_AFTER:%.*]] = phi ptr [ [[E_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ]
+ // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], ptr [[E_AFTER]], i64 -1
+ // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[E_CUR]])
+ // CHECKv11-NEXT: call void @_ZN5test01AD1Ev(ptr {{[^,]*}} [[E_CUR]])
+ // CHECK: [[T0:%.*]] = icmp eq ptr [[E_CUR]], [[E0]]
// CHECK-NEXT: br i1 [[T0]],
}
@@ -104,30 +104,30 @@ namespace test1 {
B v = { 5, 6, 7, 8 };
}
// CHECK-LABEL: define{{.*}} void @_ZN5test14testEv()
- // CHECK-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-SAME: personality ptr @__gxx_personality_v0
// CHECK: [[V:%.*]] = alloca [[B:%.*]], align 4
- // CHECK-NEXT: alloca i8*
+ // CHECK-NEXT: alloca ptr
// CHECK-NEXT: alloca i32
- // CHECK-NEXT: [[X:%.*]] = getelementptr inbounds [[B]], [[B]]* [[V]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN5test11AC1Ei([[A:%.*]]* {{[^,]*}} [[X]], i32 noundef 5)
- // CHECK-NEXT: [[Y:%.*]] = getelementptr inbounds [[B]], [[B]]* [[V]], i32 0, i32 1
- // CHECK-NEXT: invoke void @_ZN5test11AC1Ei([[A]]* {{[^,]*}} [[Y]], i32 noundef 6)
- // CHECK: [[Z:%.*]] = getelementptr inbounds [[B]], [[B]]* [[V]], i32 0, i32 2
- // CHECK-NEXT: invoke void @_ZN5test11AC1Ei([[A]]* {{[^,]*}} [[Z]], i32 noundef 7)
- // CHECK: [[W:%.*]] = getelementptr inbounds [[B]], [[B]]* [[V]], i32 0, i32 3
- // CHECK-NEXT: store i32 8, i32* [[W]], align 4
- // CHECK-NEXT: call void @_ZN5test11BD1Ev([[B]]* {{[^,]*}} [[V]])
+ // CHECK-NEXT: [[X:%.*]] = getelementptr inbounds [[B]], ptr [[V]], i32 0, i32 0
+ // CHECK-NEXT: call void @_ZN5test11AC1Ei(ptr {{[^,]*}} [[X]], i32 noundef 5)
+ // CHECK-NEXT: [[Y:%.*]] = getelementptr inbounds [[B]], ptr [[V]], i32 0, i32 1
+ // CHECK-NEXT: invoke void @_ZN5test11AC1Ei(ptr {{[^,]*}} [[Y]], i32 noundef 6)
+ // CHECK: [[Z:%.*]] = getelementptr inbounds [[B]], ptr [[V]], i32 0, i32 2
+ // CHECK-NEXT: invoke void @_ZN5test11AC1Ei(ptr {{[^,]*}} [[Z]], i32 noundef 7)
+ // CHECK: [[W:%.*]] = getelementptr inbounds [[B]], ptr [[V]], i32 0, i32 3
+ // CHECK-NEXT: store i32 8, ptr [[W]], align 4
+ // CHECK-NEXT: call void @_ZN5test11BD1Ev(ptr {{[^,]*}} [[V]])
// CHECK-NEXT: ret void
// FIXME: again, the block ordering is pretty bad here
- // CHECK: landingpad { i8*, i32 }
+ // CHECK: landingpad { ptr, i32 }
// CHECK-NEXT: cleanup
- // CHECK: landingpad { i8*, i32 }
+ // CHECK: landingpad { ptr, i32 }
// CHECK-NEXT: cleanup
- // CHECKv03: invoke void @_ZN5test11AD1Ev([[A]]* {{[^,]*}} [[Y]])
- // CHECKv03: invoke void @_ZN5test11AD1Ev([[A]]* {{[^,]*}} [[X]])
- // CHECKv11: call void @_ZN5test11AD1Ev([[A]]* {{[^,]*}} [[Y]])
- // CHECKv11: call void @_ZN5test11AD1Ev([[A]]* {{[^,]*}} [[X]])
+ // CHECKv03: invoke void @_ZN5test11AD1Ev(ptr {{[^,]*}} [[Y]])
+ // CHECKv03: invoke void @_ZN5test11AD1Ev(ptr {{[^,]*}} [[X]])
+ // CHECKv11: call void @_ZN5test11AD1Ev(ptr {{[^,]*}} [[Y]])
+ // CHECKv11: call void @_ZN5test11AD1Ev(ptr {{[^,]*}} [[X]])
}
namespace test2 {
@@ -137,31 +137,31 @@ namespace test2 {
A v[4][7];
// CHECK-LABEL: define{{.*}} void @_ZN5test24testEv()
- // CHECK-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-SAME: personality ptr @__gxx_personality_v0
// CHECK: [[V:%.*]] = alloca [4 x [7 x [[A:%.*]]]], align 1
- // CHECK-NEXT: alloca i8*
+ // CHECK-NEXT: alloca ptr
// CHECK-NEXT: alloca i32
// Main initialization loop.
- // CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [4 x [7 x [[A]]]], [4 x [7 x [[A]]]]* [[V]], i32 0, i32 0, i32 0
- // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 28
+ // CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [4 x [7 x [[A]]]], ptr [[V]], i32 0, i32 0, i32 0
+ // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], ptr [[BEGIN]], i64 28
// CHECK-NEXT: br label
- // CHECK: [[CUR:%.*]] = phi [[A]]* [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
- // CHECK-NEXT: invoke void @_ZN5test21AC1Ev([[A]]* {{[^,]*}} [[CUR]])
- // CHECK: [[NEXT:%.*]] = getelementptr inbounds [[A]], [[A]]* [[CUR]], i64 1
- // CHECK-NEXT: [[DONE:%.*]] = icmp eq [[A]]* [[NEXT]], [[END]]
+ // CHECK: [[CUR:%.*]] = phi ptr [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
+ // CHECK-NEXT: invoke void @_ZN5test21AC1Ev(ptr {{[^,]*}} [[CUR]])
+ // CHECK: [[NEXT:%.*]] = getelementptr inbounds [[A]], ptr [[CUR]], i64 1
+ // CHECK-NEXT: [[DONE:%.*]] = icmp eq ptr [[NEXT]], [[END]]
// CHECK-NEXT: br i1 [[DONE]],
// Partial destruction landing pad.
- // CHECK: landingpad { i8*, i32 }
+ // CHECK: landingpad { ptr, i32 }
// CHECK-NEXT: cleanup
- // CHECK: [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[CUR]]
+ // CHECK: [[EMPTY:%.*]] = icmp eq ptr [[BEGIN]], [[CUR]]
// CHECK-NEXT: br i1 [[EMPTY]],
- // CHECK: [[PAST:%.*]] = phi [[A]]* [ [[CUR]], {{%.*}} ], [ [[DEL:%.*]], {{%.*}} ]
- // CHECK-NEXT: [[DEL]] = getelementptr inbounds [[A]], [[A]]* [[PAST]], i64 -1
- // CHECKv03-NEXT: invoke void @_ZN5test21AD1Ev([[A]]* {{[^,]*}} [[DEL]])
- // CHECKv11-NEXT: call void @_ZN5test21AD1Ev([[A]]* {{[^,]*}} [[DEL]])
- // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[DEL]], [[BEGIN]]
+ // CHECK: [[PAST:%.*]] = phi ptr [ [[CUR]], {{%.*}} ], [ [[DEL:%.*]], {{%.*}} ]
+ // CHECK-NEXT: [[DEL]] = getelementptr inbounds [[A]], ptr [[PAST]], i64 -1
+ // CHECKv03-NEXT: invoke void @_ZN5test21AD1Ev(ptr {{[^,]*}} [[DEL]])
+ // CHECKv11-NEXT: call void @_ZN5test21AD1Ev(ptr {{[^,]*}} [[DEL]])
+ // CHECK: [[T0:%.*]] = icmp eq ptr [[DEL]], [[BEGIN]]
// CHECK-NEXT: br i1 [[T0]],
}
@@ -189,25 +189,25 @@ namespace test4 {
}
// CHECK-LABEL: define{{.*}} void @_ZN5test44testEv()
// CHECK: [[ARRAY:%.*]] = alloca [2 x [3 x [[A:%.*]]]], align
-// CHECK: [[A0:%.*]] = getelementptr inbounds [2 x [3 x [[A]]]], [2 x [3 x [[A]]]]* [[ARRAY]], i64 0, i64 0
-// CHECK-NEXT: store [3 x [[A]]]* [[A0]],
-// CHECK-NEXT: [[A00:%.*]] = getelementptr inbounds [3 x [[A]]], [3 x [[A]]]* [[A0]], i64 0, i64 0
-// CHECK-NEXT: store [[A]]* [[A00]],
-// CHECK-NEXT: invoke void @_ZN5test41AC1Ej([[A]]* {{[^,]*}} [[A00]], i32 noundef 0)
-// CHECK: [[A01:%.*]] = getelementptr inbounds [[A]], [[A]]* [[A00]], i64 1
-// CHECK-NEXT: store [[A]]* [[A01]],
-// CHECK-NEXT: invoke void @_ZN5test41AC1Ej([[A]]* {{[^,]*}} [[A01]], i32 noundef 1)
-// CHECK: [[A02:%.*]] = getelementptr inbounds [[A]], [[A]]* [[A01]], i64 1
-// CHECK-NEXT: store [[A]]* [[A02]],
-// CHECK-NEXT: invoke void @_ZN5test41AC1Ej([[A]]* {{[^,]*}} [[A02]], i32 noundef 2)
-// CHECK: [[A1:%.*]] = getelementptr inbounds [3 x [[A]]], [3 x [[A]]]* [[A0]], i64 1
-// CHECK-NEXT: store [3 x [[A]]]* [[A1]],
-// CHECK-NEXT: [[A10:%.*]] = getelementptr inbounds [3 x [[A]]], [3 x [[A]]]* [[A1]], i64 0, i64 0
-// CHECK-NEXT: store [[A]]* [[A10]],
-// CHECK-NEXT: invoke void @_ZN5test41AC1Ej([[A]]* {{[^,]*}} [[A10]], i32 noundef 3)
-// CHECK: [[A11:%.*]] = getelementptr inbounds [[A]], [[A]]* [[A10]], i64 1
-// CHECK-NEXT: store [[A]]* [[A11]],
-// CHECK-NEXT: invoke void @_ZN5test41AC1Ej([[A]]* {{[^,]*}} [[A11]], i32 noundef 4)
-// CHECK: [[A12:%.*]] = getelementptr inbounds [[A]], [[A]]* [[A11]], i64 1
-// CHECK-NEXT: store [[A]]* [[A12]],
-// CHECK-NEXT: invoke void @_ZN5test41AC1Ej([[A]]* {{[^,]*}} [[A12]], i32 noundef 5)
+// CHECK: [[A0:%.*]] = getelementptr inbounds [2 x [3 x [[A]]]], ptr [[ARRAY]], i64 0, i64 0
+// CHECK-NEXT: store ptr [[A0]],
+// CHECK-NEXT: [[A00:%.*]] = getelementptr inbounds [3 x [[A]]], ptr [[A0]], i64 0, i64 0
+// CHECK-NEXT: store ptr [[A00]],
+// CHECK-NEXT: invoke void @_ZN5test41AC1Ej(ptr {{[^,]*}} [[A00]], i32 noundef 0)
+// CHECK: [[A01:%.*]] = getelementptr inbounds [[A]], ptr [[A00]], i64 1
+// CHECK-NEXT: store ptr [[A01]],
+// CHECK-NEXT: invoke void @_ZN5test41AC1Ej(ptr {{[^,]*}} [[A01]], i32 noundef 1)
+// CHECK: [[A02:%.*]] = getelementptr inbounds [[A]], ptr [[A01]], i64 1
+// CHECK-NEXT: store ptr [[A02]],
+// CHECK-NEXT: invoke void @_ZN5test41AC1Ej(ptr {{[^,]*}} [[A02]], i32 noundef 2)
+// CHECK: [[A1:%.*]] = getelementptr inbounds [3 x [[A]]], ptr [[A0]], i64 1
+// CHECK-NEXT: store ptr [[A1]],
+// CHECK-NEXT: [[A10:%.*]] = getelementptr inbounds [3 x [[A]]], ptr [[A1]], i64 0, i64 0
+// CHECK-NEXT: store ptr [[A10]],
+// CHECK-NEXT: invoke void @_ZN5test41AC1Ej(ptr {{[^,]*}} [[A10]], i32 noundef 3)
+// CHECK: [[A11:%.*]] = getelementptr inbounds [[A]], ptr [[A10]], i64 1
+// CHECK-NEXT: store ptr [[A11]],
+// CHECK-NEXT: invoke void @_ZN5test41AC1Ej(ptr {{[^,]*}} [[A11]], i32 noundef 4)
+// CHECK: [[A12:%.*]] = getelementptr inbounds [[A]], ptr [[A11]], i64 1
+// CHECK-NEXT: store ptr [[A12]],
+// CHECK-NEXT: invoke void @_ZN5test41AC1Ej(ptr {{[^,]*}} [[A12]], i32 noundef 5)
diff --git a/clang/test/CodeGenCXX/pass-object-size.cpp b/clang/test/CodeGenCXX/pass-object-size.cpp
index 632cd1eaea5cb..488839bc0b809 100644
--- a/clang/test/CodeGenCXX/pass-object-size.cpp
+++ b/clang/test/CodeGenCXX/pass-object-size.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -emit-llvm -O0 %s -o - 2>&1 -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -O0 %s -o - 2>&1 -std=c++11 | FileCheck %s
int gi;
@@ -50,8 +50,8 @@ namespace delegate {
};
A::A(void *const p __attribute__((pass_object_size(0)))) {}
// Ensure that we forward the size through a delegating constructor call.
- // CHECK: define{{.*}} void @_ZN8delegate1AC1EPvU17pass_object_size0({{[^,]*}}, i8*{{[^,]*}}, i64{{[^,]*}})
- // CHECK: call void @_ZN8delegate1AC2EPvU17pass_object_size0({{[^,]*}}, i8*{{[^,]*}}, i64{{[^,]*}})
+ // CHECK: define{{.*}} void @_ZN8delegate1AC1EPvU17pass_object_size0({{[^,]*}}, ptr {{.*}}, i64{{[^,]*}})
+ // CHECK: call void @_ZN8delegate1AC2EPvU17pass_object_size0({{[^,]*}}, ptr {{.*}}, i64{{[^,]*}})
}
namespace variadic {
diff --git a/clang/test/CodeGenCXX/pointers-to-data-members.cpp b/clang/test/CodeGenCXX/pointers-to-data-members.cpp
index 379fd64ea5a1b..29f1c3f48e3ac 100644
--- a/clang/test/CodeGenCXX/pointers-to-data-members.cpp
+++ b/clang/test/CodeGenCXX/pointers-to-data-members.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o %t.ll -triple=x86_64-apple-darwin10
+// RUN: %clang_cc1 %s -emit-llvm -o %t.ll -triple=x86_64-apple-darwin10
// RUN: FileCheck %s < %t.ll
// RUN: FileCheck -check-prefix=CHECK-GLOBAL %s < %t.ll
@@ -70,21 +70,21 @@ int A::*pa;
int C::*pc;
void f() {
- // CHECK: store i64 -1, i64* @_ZN5Casts2paE
+ // CHECK: store i64 -1, ptr @_ZN5Casts2paE
pa = 0;
- // CHECK-NEXT: [[TMP:%.*]] = load i64, i64* @_ZN5Casts2paE, align 8
+ // CHECK-NEXT: [[TMP:%.*]] = load i64, ptr @_ZN5Casts2paE, align 8
// CHECK-NEXT: [[ADJ:%.*]] = add nsw i64 [[TMP]], 4
// CHECK-NEXT: [[ISNULL:%.*]] = icmp eq i64 [[TMP]], -1
// CHECK-NEXT: [[RES:%.*]] = select i1 [[ISNULL]], i64 [[TMP]], i64 [[ADJ]]
- // CHECK-NEXT: store i64 [[RES]], i64* @_ZN5Casts2pcE
+ // CHECK-NEXT: store i64 [[RES]], ptr @_ZN5Casts2pcE
pc = pa;
- // CHECK-NEXT: [[TMP:%.*]] = load i64, i64* @_ZN5Casts2pcE, align 8
+ // CHECK-NEXT: [[TMP:%.*]] = load i64, ptr @_ZN5Casts2pcE, align 8
// CHECK-NEXT: [[ADJ:%.*]] = sub nsw i64 [[TMP]], 4
// CHECK-NEXT: [[ISNULL:%.*]] = icmp eq i64 [[TMP]], -1
// CHECK-NEXT: [[RES:%.*]] = select i1 [[ISNULL]], i64 [[TMP]], i64 [[ADJ]]
- // CHECK-NEXT: store i64 [[RES]], i64* @_ZN5Casts2paE
+ // CHECK-NEXT: store i64 [[RES]], ptr @_ZN5Casts2paE
pa = static_cast<int A::*>(pc);
}
@@ -122,8 +122,8 @@ struct A {
A();
};
-// CHECK-LABEL: define{{.*}} void @_ZN9ValueInit1AC2Ev(%"struct.ValueInit::A"* {{[^,]*}} %this) unnamed_addr
-// CHECK: store i64 -1, i64*
+// CHECK-LABEL: define{{.*}} void @_ZN9ValueInit1AC2Ev(ptr {{[^,]*}} %this) unnamed_addr
+// CHECK: store i64 -1, ptr
// CHECK: ret void
A::A() : a() {}
@@ -136,15 +136,15 @@ struct A {
int A::*i;
};
-// CHECK-GLOBAL: @_ZN12VirtualBases1bE ={{.*}} global %"struct.VirtualBases::B" { i32 (...)** null, %"struct.VirtualBases::A" { i8 0, i64 -1 } }, align 8
+// CHECK-GLOBAL: @_ZN12VirtualBases1bE ={{.*}} global %"struct.VirtualBases::B" { ptr null, %"struct.VirtualBases::A" { i8 0, i64 -1 } }, align 8
struct B : virtual A { };
B b;
-// CHECK-GLOBAL: @_ZN12VirtualBases1cE ={{.*}} global %"struct.VirtualBases::C" { i32 (...)** null, i64 -1, %"struct.VirtualBases::A" { i8 0, i64 -1 } }, align 8
+// CHECK-GLOBAL: @_ZN12VirtualBases1cE ={{.*}} global %"struct.VirtualBases::C" { ptr null, i64 -1, %"struct.VirtualBases::A" { i8 0, i64 -1 } }, align 8
struct C : virtual A { int A::*i; };
C c;
-// CHECK-GLOBAL: @_ZN12VirtualBases1dE ={{.*}} global %"struct.VirtualBases::D" { %"struct.VirtualBases::C.base" { i32 (...)** null, i64 -1 }, i64 -1, %"struct.VirtualBases::A" { i8 0, i64 -1 } }, align 8
+// CHECK-GLOBAL: @_ZN12VirtualBases1dE ={{.*}} global %"struct.VirtualBases::D" { %"struct.VirtualBases::C.base" { ptr null, i64 -1 }, i64 -1, %"struct.VirtualBases::A" { i8 0, i64 -1 } }, align 8
struct D : C { int A::*i; };
D d;
@@ -166,11 +166,10 @@ namespace BoolPtrToMember {
bool member;
};
- // CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
+ // CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
bool &f(X &x, bool X::*member) {
- // CHECK: {{bitcast.* to i8\*}}
- // CHECK-NEXT: getelementptr inbounds i8, i8*
- // CHECK-NEXT: ret i8*
+ // CHECK: getelementptr inbounds i8, ptr
+ // CHECK-NEXT: ret ptr
return x.*member;
}
}
@@ -191,7 +190,7 @@ namespace test4 {
struct C : virtual B { int *C_p; };
struct D : C { int *D_p; };
- // CHECK-GLOBAL: @_ZN5test41dE ={{.*}} global %"struct.test4::D" { %"struct.test4::C.base" zeroinitializer, i32* null, %"struct.test4::B.base" { i32 (...)** null, i64 -1 }, %"struct.test4::A" zeroinitializer }, align 8
+ // CHECK-GLOBAL: @_ZN5test41dE ={{.*}} global %"struct.test4::D" { %"struct.test4::C.base" zeroinitializer, ptr null, %"struct.test4::B.base" { ptr null, i64 -1 }, %"struct.test4::A" zeroinitializer }, align 8
D d;
}
diff --git a/clang/test/CodeGenCXX/ppc32-varargs-method.cpp b/clang/test/CodeGenCXX/ppc32-varargs-method.cpp
index f56a1f54e5da1..475a28b4a1d15 100644
--- a/clang/test/CodeGenCXX/ppc32-varargs-method.cpp
+++ b/clang/test/CodeGenCXX/ppc32-varargs-method.cpp
@@ -1,5 +1,5 @@
// REQUIRES: powerpc-registered-target
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-openbsd -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple powerpc-unknown-openbsd -emit-llvm -o - %s | FileCheck %s
#include <stdarg.h>
@@ -10,11 +10,10 @@ method test(va_list ap) {
return va_arg(ap, method);
}
// CHECK: using_regs:
-// CHECK-NEXT: getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{[0-9]+}}, i32 0, i32 4
-// CHECK-NEXT: load i8*, i8** %{{[0-9]+}}, align 4
+// CHECK-NEXT: getelementptr inbounds %struct.__va_list_tag, ptr %{{[0-9]+}}, i32 0, i32 4
+// CHECK-NEXT: load ptr, ptr %{{[0-9]+}}, align 4
// CHECK-NEXT: mul i8 %numUsedRegs, 4
-// CHECK-NEXT: getelementptr inbounds i8, i8* %{{[0-9]+}}, i8 %{{[0-9]+}}
-// CHECK-NEXT: bitcast i8* %{{[0-9]+}} to { i32, i32 }**
+// CHECK-NEXT: getelementptr inbounds i8, ptr %{{[0-9]+}}, i8 %{{[0-9]+}}
// CHECK-NEXT: add i8 %numUsedRegs, 1
-// CHECK-NEXT: store i8 %{{[0-9]+}}, i8* %gpr, align 4
+// CHECK-NEXT: store i8 %{{[0-9]+}}, ptr %gpr, align 4
// CHECK-NEXT: br label %cont
diff --git a/clang/test/CodeGenCXX/pragma-pack-2.cpp b/clang/test/CodeGenCXX/pragma-pack-2.cpp
index 9c3871f4b016c..7728f570bc573 100644
--- a/clang/test/CodeGenCXX/pragma-pack-2.cpp
+++ b/clang/test/CodeGenCXX/pragma-pack-2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.7.2 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.2 %s -emit-llvm -o - | FileCheck %s
// <rdar://problem/10551376>
struct FOO {
@@ -14,4 +14,6 @@ struct BAR : FOO {
#pragma pack(pop)
-BAR* x = 0;
\ No newline at end of file
+BAR f(BAR x) {
+ return x;
+}
diff --git a/clang/test/CodeGenCXX/pragma-pack.cpp b/clang/test/CodeGenCXX/pragma-pack.cpp
index dbf15d52c8b15..aecd2cf52e0e3 100644
--- a/clang/test/CodeGenCXX/pragma-pack.cpp
+++ b/clang/test/CodeGenCXX/pragma-pack.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=i686-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=i686-apple-darwin10 -emit-llvm -o - | FileCheck %s
struct Base {
virtual ~Base();
@@ -10,7 +10,9 @@ struct Sub : virtual Base {
char c;
};
-// CHECK: %struct.Sub = type <{ i32 (...)**, i8, %struct.Base }>
-void f(Sub*) { }
+// CHECK: %struct.Sub = type <{ ptr, i8, %struct.Base }>
+Sub f(Sub x) {
+ return x;
+}
static int i[sizeof(Sub) == 13 ? 1 : -1];
diff --git a/clang/test/CodeGenCXX/reference-init.cpp b/clang/test/CodeGenCXX/reference-init.cpp
index 29cd5258dd10b..3c1f4898c4261 100644
--- a/clang/test/CodeGenCXX/reference-init.cpp
+++ b/clang/test/CodeGenCXX/reference-init.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -verify %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm %s -o - -std=c++98 | FileCheck %s --check-prefix=CHECK-CXX98
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm %s -o - -std=c++11 | FileCheck %s --check-prefix=CHECK-CXX11
+// RUN: %clang_cc1 -triple %itanium_abi_triple -verify %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - -std=c++98 | FileCheck %s --check-prefix=CHECK-CXX98
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - -std=c++11 | FileCheck %s --check-prefix=CHECK-CXX11
// expected-no-diagnostics
#if __cplusplus >= 201103L
-// CHECK-CXX11: @_ZZ15InitRefWithListvE1r = internal constant i32* @_ZGRZ15InitRefWithListvE1r_
+// CHECK-CXX11: @_ZZ15InitRefWithListvE1r = internal constant ptr @_ZGRZ15InitRefWithListvE1r_
// CHECK-CXX11: @_ZGRZ15InitRefWithListvE1r_ = internal constant i32 123
int InitRefWithList() { static const int &r = {123}; return r; }
#endif
@@ -37,6 +37,6 @@ const int &s2 = s.bitfield;
struct SelfReference { SelfReference &r; };
extern SelfReference self_reference_1;
SelfReference self_reference_2 = {self_reference_1};
-// CHECK-CXX98: @self_reference_2 = {{.*}}global %[[SELF_REF:.*]] { %[[SELF_REF]]* @self_reference_1 }
+// CHECK-CXX98: @self_reference_2 = {{.*}}global %[[SELF_REF:.*]] { ptr @self_reference_1 }
// CHECK-CXX11: @self_reference_2 = {{(dso_local )?}}global %[[SELF_REF:.*]] zeroinitializer
-// CHECK-CXX11: call {{.*}}memcpy{{.*}} @self_reference_2 {{.*}} @self_reference_1
+// CHECK-CXX11: call {{.*}}memcpy{{.*}} @self_reference_2, {{.*}} @self_reference_1
diff --git a/clang/test/CodeGenCXX/reference-temporary-ms.cpp b/clang/test/CodeGenCXX/reference-temporary-ms.cpp
index 15174b1b9b955..6c4101634920d 100644
--- a/clang/test/CodeGenCXX/reference-temporary-ms.cpp
+++ b/clang/test/CodeGenCXX/reference-temporary-ms.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %std_cxx98-14 -no-opaque-pointers -emit-llvm %s -o - -triple=i386-pc-win32 -fms-extensions | FileCheck %s --check-prefixes=CHECK,PRE17
-// RUN: %clang_cc1 %std_cxx17- -no-opaque-pointers -emit-llvm %s -o - -triple=i386-pc-win32 -fms-extensions | FileCheck %s --check-prefixes=CHECK,CXX17
+// RUN: %clang_cc1 %std_cxx98-14 -emit-llvm %s -o - -triple=i386-pc-win32 -fms-extensions | FileCheck %s --check-prefixes=CHECK,PRE17
+// RUN: %clang_cc1 %std_cxx17- -emit-llvm %s -o - -triple=i386-pc-win32 -fms-extensions | FileCheck %s --check-prefixes=CHECK,CXX17
const int __declspec(dllexport) &Exported = 42;
@@ -7,4 +7,4 @@ const int __declspec(dllexport) &Exported = 42;
// PRE17: @"?$RT1 at Exported@@3ABHB" = internal constant i32 42
// CXX17: @"?$RT1 at Exported@@3ABHB" = internal global i32 42
-// CHECK: @"?Exported@@3ABHB" = dso_local dllexport constant i32* @"?$RT1 at Exported@@3ABHB"
+// CHECK: @"?Exported@@3ABHB" = dso_local dllexport constant ptr @"?$RT1 at Exported@@3ABHB"
diff --git a/clang/test/CodeGenCXX/references.cpp b/clang/test/CodeGenCXX/references.cpp
index ab3f32936fd49..0fca5e76659c2 100644
--- a/clang/test/CodeGenCXX/references.cpp
+++ b/clang/test/CodeGenCXX/references.cpp
@@ -1,16 +1,16 @@
-// RUN: not %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -verify -emit-llvm -o - %s | FileCheck %s
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin -verify -emit-llvm -o - %s | FileCheck %s
void t1() {
// CHECK-LABEL: define{{.*}} void @_Z2t1v
- // CHECK: [[REFLOAD:%.*]] = load i32*, i32** @a, align 8
- // CHECK: load i32, i32* [[REFLOAD]], align 4
+ // CHECK: [[REFLOAD:%.*]] = load ptr, ptr @a, align 8
+ // CHECK: load i32, ptr [[REFLOAD]], align 4
extern int& a;
int b = a;
}
void t2(int& a) {
// CHECK-LABEL: define{{.*}} void @_Z2t2Ri
- // CHECK: [[REFLOAD2:%.*]] = load i32*, i32** {{.*}}, align 8
- // CHECK: load i32, i32* [[REFLOAD2]], align 4
+ // CHECK: [[REFLOAD2:%.*]] = load ptr, ptr {{.*}}, align 8
+ // CHECK: load i32, ptr [[REFLOAD2]], align 4
int b = a;
}
@@ -241,7 +241,7 @@ struct A {
};
// CHECK-LABEL: define internal void @__cxx_global_var_init
-// CHECK: call void @_ZN2N31AC1Ei(%"struct.N3::A"* {{[^,]*}} @_ZGRN2N35sA123E_, i32 noundef 123)
+// CHECK: call void @_ZN2N31AC1Ei(ptr {{[^,]*}} @_ZGRN2N35sA123E_, i32 noundef 123)
// CHECK: call i32 @__cxa_atexit
// CHECK: ret void
const A &sA123 = A(123);
@@ -256,7 +256,7 @@ struct A {
void f() {
// CHECK-LABEL: define{{.*}} void @_ZN2N41fEv
- // CHECK: call void @_ZN2N41AC1Ev(%"struct.N4::A"* {{[^,]*}} @_ZGRZN2N41fEvE2ar_)
+ // CHECK: call void @_ZN2N41AC1Ev(ptr {{[^,]*}} @_ZGRZN2N41fEvE2ar_)
// CHECK: call i32 @__cxa_atexit
// CHECK: ret void
static const A& ar = A();
@@ -271,7 +271,7 @@ void f(const bool&);
AnyS g();
void h() {
// CHECK: call i8 @_ZN2N51gEv()
- // CHECK: call void @_ZN2N51fERKb(i8*
+ // CHECK: call void @_ZN2N51fERKb(ptr
f(g().b);
}
}
@@ -284,16 +284,14 @@ namespace PR9565 {
// CHECK: call void @llvm.memcpy
a x = { 0, 0 };
// CHECK: [[WITH_SEVENTEEN:%[.a-zA-Z0-9]+]] = or i32 [[WITHOUT_SEVENTEEN:%[.a-zA-Z0-9]+]], 17
- // CHECK: store i32 [[WITH_SEVENTEEN]], i32* [[XA:%[.a-zA-Z0-9]+]]
+ // CHECK: store i32 [[WITH_SEVENTEEN]], ptr [[XA:%[.a-zA-Z0-9]+]]
x.a = 17;
- // CHECK-NEXT: bitcast
// CHECK-NEXT: load
// CHECK-NEXT: shl
// CHECK-NEXT: ashr
// CHECK-NEXT: store i32
- // CHECK-NEXT: store i32*
+ // CHECK-NEXT: store ptr
const int &y = x.a;
- // CHECK-NEXT: bitcast
// CHECK-NEXT: load
// CHECK-NEXT: and
// CHECK-NEXT: or i32 {{.*}}, 19456
@@ -307,6 +305,6 @@ namespace N6 {
extern struct x {char& x;}y;
int a() { return y.x; }
// CHECK-LABEL: define{{.*}} i32 @_ZN2N61aEv
- // CHECK: [[REFLOAD3:%.*]] = load i8*, i8** getelementptr inbounds (%"struct.N6::x", %"struct.N6::x"* @_ZN2N61yE, i32 0, i32 0), align 8
- // CHECK: load i8, i8* [[REFLOAD3]], align 1
+ // CHECK: [[REFLOAD3:%.*]] = load ptr, ptr @_ZN2N61yE, align 8
+ // CHECK: load i8, ptr [[REFLOAD3]], align 1
}
diff --git a/clang/test/CodeGenCXX/rtti-linkage.cpp b/clang/test/CodeGenCXX/rtti-linkage.cpp
index 9a2791670bbd9..e3391c9308f85 100644
--- a/clang/test/CodeGenCXX/rtti-linkage.cpp
+++ b/clang/test/CodeGenCXX/rtti-linkage.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %std_cxx98- -no-opaque-pointers %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -Wno-dynamic-exception-spec -o - | FileCheck %s -check-prefixes=CHECK,CHECK-BOTH
-// RUN: %clang_cc1 %std_cxx98- -no-opaque-pointers %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -Wno-dynamic-exception-spec -fvisibility=hidden -o - | FileCheck %s --check-prefixes=CHECK-WITH-HIDDEN,CHECK-BOTH
+// RUN: %clang_cc1 %std_cxx98- %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -Wno-dynamic-exception-spec -o - | FileCheck %s -check-prefixes=CHECK,CHECK-BOTH
+// RUN: %clang_cc1 %std_cxx98- %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -Wno-dynamic-exception-spec -fvisibility=hidden -o - | FileCheck %s --check-prefixes=CHECK-WITH-HIDDEN,CHECK-BOTH
#include <typeinfo>
@@ -71,7 +71,7 @@
// CHECK: _ZTIZ2t7vE1A = linkonce_odr constant
// CHECK: _ZTIPZ2t7vE1A = linkonce_odr constant
-// CHECK: _ZTIN12_GLOBAL__N_11DE to
+// CHECK: _ZTIN12_GLOBAL__N_11DE
// A has no key function, so its RTTI data should be linkonce_odr.
struct A { };
diff --git a/clang/test/CodeGenCXX/rvalue-references.cpp b/clang/test/CodeGenCXX/rvalue-references.cpp
index 4eae2a3340849..3a4a93c32122c 100644
--- a/clang/test/CodeGenCXX/rvalue-references.cpp
+++ b/clang/test/CodeGenCXX/rvalue-references.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
struct Spacer { int x; };
@@ -7,32 +7,30 @@ struct B : Spacer, A { };
B &getB();
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.A* @_Z4getAv()
-// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.B* @_Z4getBv()
-// CHECK-NEXT: bitcast %struct.B*
-// CHECK-NEXT: getelementptr inbounds i8, i8*
-// CHECK-NEXT: bitcast i8* {{.*}} to %struct.A*
-// CHECK-NEXT: ret %struct.A*
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z4getAv()
+// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z4getBv()
+// CHECK-NEXT: getelementptr inbounds i8, ptr
+// CHECK-NEXT: ret ptr
A &&getA() { return static_cast<A&&>(getB()); }
int &getIntLValue();
int &&getIntXValue();
int getIntPRValue();
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z2f0v()
-// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z12getIntLValuev()
-// CHECK-NEXT: ret i32*
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z2f0v()
+// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z12getIntLValuev()
+// CHECK-NEXT: ret ptr
int &&f0() { return static_cast<int&&>(getIntLValue()); }
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z2f1v()
-// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z12getIntXValuev()
-// CHECK-NEXT: ret i32*
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z2f1v()
+// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z12getIntXValuev()
+// CHECK-NEXT: ret ptr
int &&f1() { return static_cast<int&&>(getIntXValue()); }
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z2f2v
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z2f2v
// CHECK: call noundef i32 @_Z13getIntPRValuev()
-// CHECK-NEXT: store i32 {{.*}}, i32*
-// CHECK-NEXT: ret i32*
+// CHECK-NEXT: store i32 {{.*}}, ptr
+// CHECK-NEXT: ret ptr
int &&f2() { return static_cast<int&&>(getIntPRValue()); }
bool ok;
@@ -95,8 +93,8 @@ namespace test1 {
};
// CHECK-LABEL: define{{.*}} void @_ZN5test11BC2Ei(
- // CHECK: [[T0:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_ZN5test14moveERi(
- // CHECK-NEXT: [[T1:%.*]] = load i32, i32* [[T0]]
+ // CHECK: [[T0:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN5test14moveERi(
+ // CHECK-NEXT: [[T1:%.*]] = load i32, ptr [[T0]]
// CHECK-NEXT: call void @_ZN5test11AC1Ei({{.*}}, i32 noundef [[T1]])
// CHECK-NEXT: ret void
B::B(int i) : a(move(i)) {}
diff --git a/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp b/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp
index dbce500281831..e036bcaf729a6 100644
--- a/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp
+++ b/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu %s -o - -emit-llvm -O1 \
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -o - -emit-llvm -O1 \
// RUN: -fexceptions -fcxx-exceptions -mllvm -simplifycfg-sink-common=false | FileCheck %s
//
// We should emit lifetime.ends for these temporaries in both the 'exception'
@@ -20,35 +20,32 @@ struct NontrivialDtor {
// CHECK-LABEL: define{{.*}} void @_Z33cleanupsAreEmittedWithoutTryCatchv
void cleanupsAreEmittedWithoutTryCatch() {
-// CHECK: %[[CLEAN:[^ ]+]] = bitcast %struct.NontrivialDtor* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]])
-// CHECK: %[[T1:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[CLEAN:.*]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T1:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[CONT:[^ ]+]] unwind label %[[LPAD:[^ ]+]]
//
// CHECK: [[CONT]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
-// CHECK: %[[T2:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T2:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[CONT2:[^ ]+]] unwind label %[[LPAD2:.+]]
//
// CHECK: [[CONT2]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[CLEAN]])
// CHECK: ret void
//
// CHECK: [[LPAD]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T1]])
// CHECK: br label %[[EHCLEANUP:.+]]
//
// CHECK: [[LPAD2]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T2]])
// CHECK: br label %[[EHCLEANUP]]
//
// CHECK: [[EHCLEANUP]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[CLEAN]])
NontrivialDtor clean;
@@ -58,30 +55,27 @@ void cleanupsAreEmittedWithoutTryCatch() {
// CHECK-LABEL: define{{.*}} void @_Z30cleanupsAreEmittedWithTryCatchv
void cleanupsAreEmittedWithTryCatch() {
-// CHECK: %[[CLEAN:[^ ]+]] = bitcast %struct.NontrivialDtor* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]])
-// CHECK: %[[T1:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[CLEAN:.*]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T1:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[CONT:[^ ]+]] unwind label %[[LPAD:[^ ]+]]
//
// CHECK: [[CONT]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
-// CHECK: %[[T2:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T2:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[CONT2:[^ ]+]] unwind label %[[LPAD2:.+]]
//
// CHECK: [[CONT2]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T2]])
// CHECK: br label %[[TRY_CONT:.+]]
//
// CHECK: [[LPAD]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T1]])
// CHECK: br label %[[CATCH:.+]]
//
// CHECK: [[LPAD2]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T2]])
// CHECK: br label %[[CATCH]]
//
// CHECK: [[CATCH]]:
@@ -90,14 +84,13 @@ void cleanupsAreEmittedWithTryCatch() {
// CHECK-NEXT: to label %[[TRY_CONT]] unwind label %[[OUTER_LPAD:.+]]
//
// CHECK: [[TRY_CONT]]:
-// CHECK: %[[T_OUTER:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T_OUTER]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T_OUTER:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[OUTER_CONT:[^ ]+]] unwind label %[[OUTER_LPAD2:.+]]
//
// CHECK: [[OUTER_CONT]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T_OUTER]])
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T_OUTER]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[CLEAN]])
// CHECK: ret void
//
// CHECK: [[OUTER_LPAD]]:
@@ -105,11 +98,11 @@ void cleanupsAreEmittedWithTryCatch() {
// CHECK: br label %[[EHCLEANUP:.+]]
//
// CHECK: [[OUTER_LPAD2]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T_OUTER]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T_OUTER]])
// CHECK: br label %[[EHCLEANUP]]
//
// CHECK: [[EHCLEANUP]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[CLEAN]])
NontrivialDtor clean;
@@ -123,47 +116,44 @@ void cleanupsAreEmittedWithTryCatch() {
// CHECK-LABEL: define{{.*}} void @_Z39cleanupInTryHappensBeforeCleanupInCatchv
void cleanupInTryHappensBeforeCleanupInCatch() {
-// CHECK: %[[T1:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T1:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[CONT:[^ ]+]] unwind label %[[LPAD:[^ ]+]]
//
// CHECK: [[CONT]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T1]])
// CHECK: br label %[[TRY_CONT]]
//
// CHECK: [[LPAD]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T1]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T1]])
// CHECK: br i1 {{[^,]+}}, label %[[CATCH_INT_MATCH:[^,]+]], label %[[CATCH_ALL:.+]]
//
// CHECK: [[CATCH_INT_MATCH]]:
-// CHECK: %[[T2:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T2:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[CATCH_INT_CONT:[^ ]+]] unwind label %[[CATCH_INT_LPAD:[^ ]+]]
//
// CHECK: [[CATCH_INT_CONT]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T2]])
// CHECK: br label %[[TRY_CONT]]
//
// CHECK: [[TRY_CONT]]:
// CHECK: ret void
//
// CHECK: [[CATCH_ALL]]:
-// CHECK: %[[T3:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T3]])
+// CHECK: call void @llvm.lifetime.start.p0({{[^,]+}}, ptr nonnull %[[T3:.*]])
// CHECK-NEXT: invoke void @_Z8getLargev
// CHECK-NEXT: to label %[[CATCH_ALL_CONT:[^ ]+]] unwind label %[[CATCH_ALL_LPAD:[^ ]+]]
//
// CHECK: [[CATCH_ALL_CONT]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T3]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T3]])
// CHECK: br label %[[TRY_CONT]]
//
// CHECK: [[CATCH_ALL_LPAD]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T3]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T3]])
//
// CHECK: [[CATCH_INT_LPAD]]:
-// CHECK: call void @llvm.lifetime.end.p0i8({{[^,]+}}, i8* nonnull %[[T2]])
+// CHECK: call void @llvm.lifetime.end.p0({{[^,]+}}, ptr nonnull %[[T2]])
// CHECK-NOT: call void @llvm.lifetime
try {
diff --git a/clang/test/CodeGenCXX/stack-reuse.cpp b/clang/test/CodeGenCXX/stack-reuse.cpp
index 9ffd99ab2b9b6..e2412a55c1f62 100644
--- a/clang/test/CodeGenCXX/stack-reuse.cpp
+++ b/clang/test/CodeGenCXX/stack-reuse.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple armv7-unknown-linux-gnueabihf %s -o - -emit-llvm -O2 | FileCheck %s
+// RUN: %clang_cc1 -triple armv7-unknown-linux-gnueabihf %s -o - -emit-llvm -O2 | FileCheck %s
// Stack should be reused when possible, no need to allocate two separate slots
// if they have disjoint lifetime.
@@ -134,10 +134,9 @@ int large_combiner_test(S_large s) {
// CHECK-LABEL: define{{.*}} i32 @large_combiner_test
// CHECK: [[T2:%.*]] = alloca %struct.Combiner
// CHECK: [[T1:%.*]] = alloca %struct.Combiner
-// CHECK: [[T3:%.*]] = call noundef %struct.Combiner* @_ZN8CombinerC1E7S_large(%struct.Combiner* {{[^,]*}} [[T1]], [9 x i32] %s.coerce)
-// CHECK: call void @_ZN8Combiner1fEv(%struct.Combiner* nonnull sret(%struct.Combiner) align 4 [[T2]], %struct.Combiner* {{[^,]*}} [[T1]])
-// CHECK: [[T4:%.*]] = getelementptr inbounds %struct.Combiner, %struct.Combiner* [[T2]], i32 0, i32 0, i32 0, i32 0
-// CHECK: [[T5:%.*]] = load i32, i32* [[T4]]
+// CHECK: [[T3:%.*]] = call noundef ptr @_ZN8CombinerC1E7S_large(ptr {{[^,]*}} [[T1]], [9 x i32] %s.coerce)
+// CHECK: call void @_ZN8Combiner1fEv(ptr nonnull sret(%struct.Combiner) align 4 [[T2]], ptr {{[^,]*}} [[T1]])
+// CHECK: [[T5:%.*]] = load i32, ptr [[T2]]
// CHECK: ret i32 [[T5]]
return Combiner(s).f().a.a[0];
diff --git a/clang/test/CodeGenCXX/static-init.cpp b/clang/test/CodeGenCXX/static-init.cpp
index f1bf2e0784181..01c5c5ba9b08d 100644
--- a/clang/test/CodeGenCXX/static-init.cpp
+++ b/clang/test/CodeGenCXX/static-init.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
+// RUN: %clang_cc1 %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s
+// RUN: %clang_cc1 %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
// CHECK: @_ZZ1hvE1i = internal global i32 0, align 4
// CHECK: @base_req ={{.*}} global [4 x i8] c"foo\00", align 1
@@ -11,7 +11,7 @@
// CHECK: @_ZGVZ2h2vE1i = linkonce_odr global i64 0, comdat, align 8{{$}}
// CHECK: @_ZZN5test1L6getvarEiE3var = internal constant [4 x i32] [i32 1, i32 0, i32 2, i32 4], align 16
// CHECK98: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global %"struct.test4::HasVTable" zeroinitializer, comdat, align 8
-// CHECK11: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global { i8** } { i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5test49HasVTableE, i32 0, inrange i32 0, i32 2) }, comdat, align 8
+// CHECK11: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global %"struct.test4::HasVTable" { ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5test49HasVTableE, i32 0, inrange i32 0, i32 2) }, comdat, align 8
struct A {
A();
@@ -19,16 +19,16 @@ struct A {
};
void f() {
- // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZ1fvE1a to i8*) acquire, align 8
+ // CHECK: load atomic i8, ptr @_ZGVZ1fvE1a acquire, align 8
// CHECK: call i32 @__cxa_guard_acquire
// CHECK: call void @_ZN1AC1Ev
- // CHECK: call i32 @__cxa_atexit(void (i8*)* bitcast (void (%struct.A*)* @_ZN1AD1Ev to void (i8*)*), i8* getelementptr inbounds (%struct.A, %struct.A* @_ZZ1fvE1a, i32 0, i32 0), i8* @__dso_handle)
+ // CHECK: call i32 @__cxa_atexit(ptr @_ZN1AD1Ev, ptr @_ZZ1fvE1a, ptr @__dso_handle)
// CHECK: call void @__cxa_guard_release
static A a;
}
void g() {
- // CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 1)
+ // CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 1)
// CHECK: call void @_ZN1AC1Ev(
static A& a = *new A;
}
@@ -74,7 +74,7 @@ unsigned char base_req_uchar[] = { "bar" };
namespace union_static_local {
// CHECK-LABEL: define internal void @_ZZN18union_static_local4testEvEN1c4mainEv
- // CHECK: call void @_ZN18union_static_local1fEPNS_1xE(%"union.union_static_local::x"* noundef bitcast ({ [2 x i8*] }* @_ZZN18union_static_local4testEvE3foo to %"union.union_static_local::x"*))
+ // CHECK: call void @_ZN18union_static_local1fEPNS_1xE(ptr noundef @_ZZN18union_static_local4testEvE3foo)
union x { long double y; const char *x[2]; };
void f(union x*);
void test() {
@@ -109,18 +109,18 @@ namespace test2 {
static int x = foo();
}
// CHECK-LABEL: define{{.*}} void @_ZN5test21BC2Ev
- // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire, align 8
- // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x)
+ // CHECK: load atomic i8, ptr @_ZGVZN5test21BC1EvE1x acquire, align 8
+ // CHECK: call i32 @__cxa_guard_acquire(ptr @_ZGVZN5test21BC1EvE1x)
// CHECK: [[T0:%.*]] = call noundef i32 @_ZN5test23fooEv()
- // CHECK: store i32 [[T0]], i32* @_ZZN5test21BC1EvE1x,
- // CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BC1EvE1x)
+ // CHECK: store i32 [[T0]], ptr @_ZZN5test21BC1EvE1x,
+ // CHECK: call void @__cxa_guard_release(ptr @_ZGVZN5test21BC1EvE1x)
// CHECK-LABEL: define{{.*}} void @_ZN5test21BC1Ev
- // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire, align 8
- // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x)
+ // CHECK: load atomic i8, ptr @_ZGVZN5test21BC1EvE1x acquire, align 8
+ // CHECK: call i32 @__cxa_guard_acquire(ptr @_ZGVZN5test21BC1EvE1x)
// CHECK: [[T0:%.*]] = call noundef i32 @_ZN5test23fooEv()
- // CHECK: store i32 [[T0]], i32* @_ZZN5test21BC1EvE1x,
- // CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BC1EvE1x)
+ // CHECK: store i32 [[T0]], ptr @_ZZN5test21BC1EvE1x,
+ // CHECK: call void @__cxa_guard_release(ptr @_ZGVZN5test21BC1EvE1x)
// This is just for completeness, because we actually emit this
// using a delegate dtor call.
@@ -128,11 +128,11 @@ namespace test2 {
static int y = foo();
}
// CHECK-LABEL: define{{.*}} void @_ZN5test21BD2Ev(
- // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZN5test21BD1EvE1y to i8*) acquire, align 8
- // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BD1EvE1y)
+ // CHECK: load atomic i8, ptr @_ZGVZN5test21BD1EvE1y acquire, align 8
+ // CHECK: call i32 @__cxa_guard_acquire(ptr @_ZGVZN5test21BD1EvE1y)
// CHECK: [[T0:%.*]] = call noundef i32 @_ZN5test23fooEv()
- // CHECK: store i32 [[T0]], i32* @_ZZN5test21BD1EvE1y,
- // CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BD1EvE1y)
+ // CHECK: store i32 [[T0]], ptr @_ZZN5test21BD1EvE1y,
+ // CHECK: call void @__cxa_guard_release(ptr @_ZGVZN5test21BD1EvE1y)
// CHECK-LABEL: define{{.*}} void @_ZN5test21BD1Ev(
// CHECK: call void @_ZN5test21BD2Ev(
@@ -170,6 +170,6 @@ inline HasVTable &useStaticLocal() {
void useit() {
useStaticLocal();
}
-// CHECK: define linkonce_odr noundef nonnull align 8 dereferenceable(8) %"struct.test4::HasVTable"* @_ZN5test414useStaticLocalEv()
-// CHECK: ret %"struct.test4::HasVTable"*{{.*}} @_ZZN5test414useStaticLocalEvE3obj
+// CHECK: define linkonce_odr noundef nonnull align 8 dereferenceable(8) ptr @_ZN5test414useStaticLocalEv()
+// CHECK: ret ptr{{.*}} @_ZZN5test414useStaticLocalEvE3obj
}
diff --git a/clang/test/CodeGenCXX/strict-vtable-pointers.cpp b/clang/test/CodeGenCXX/strict-vtable-pointers.cpp
index 9caeafeb957d2..34e50b39a5daa 100644
--- a/clang/test/CodeGenCXX/strict-vtable-pointers.cpp
+++ b/clang/test/CodeGenCXX/strict-vtable-pointers.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -I%S -triple=x86_64-apple-darwin10 -fstrict-vtable-pointers -std=c++11 -disable-llvm-passes -O2 -emit-llvm -o %t.ll
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -fstrict-vtable-pointers -std=c++11 -disable-llvm-passes -O2 -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=CHECK-CTORS %s < %t.ll
// RUN: FileCheck --check-prefix=CHECK-NEW %s < %t.ll
// RUN: FileCheck --check-prefix=CHECK-DTORS %s < %t.ll
@@ -53,7 +53,7 @@ struct DynamicFrom2Virtuals : DynamicFromVirtualStatic1,
};
// CHECK-NEW-LABEL: define{{.*}} void @_Z12LocalObjectsv()
-// CHECK-NEW-NOT: @llvm.launder.invariant.group.p0i8(
+// CHECK-NEW-NOT: @llvm.launder.invariant.group.p0(
// CHECK-NEW-LABEL: {{^}}}
void LocalObjects() {
DynamicBase1 DB;
@@ -81,21 +81,20 @@ void LocalObjects() {
struct DynamicFromVirtualStatic1;
// CHECK-CTORS-LABEL: define linkonce_odr void @_ZN25DynamicFromVirtualStatic1C1Ev
-// CHECK-CTORS-NOT: @llvm.launder.invariant.group.p0i8(
+// CHECK-CTORS-NOT: @llvm.launder.invariant.group.p0(
// CHECK-CTORS-LABEL: {{^}}}
struct DynamicFrom2Virtuals;
// CHECK-CTORS-LABEL: define linkonce_odr void @_ZN20DynamicFrom2VirtualsC1Ev
-// CHECK-CTORS: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-CTORS: call ptr @llvm.launder.invariant.group.p0(
// CHECK-CTORS-LABEL: {{^}}}
// CHECK-NEW-LABEL: define{{.*}} void @_Z9Pointers1v()
-// CHECK-NEW-NOT: @llvm.launder.invariant.group.p0i8(
+// CHECK-NEW-NOT: @llvm.launder.invariant.group.p0(
// CHECK-NEW-LABEL: call void @_ZN12DynamicBase1C1Ev(
-// CHECK-NEW: %[[THIS3:.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* %[[THIS2:.*]])
-// CHECK-NEW: %[[THIS4:.*]] = bitcast i8* %[[THIS3]] to %[[DynamicDerived:.*]]*
-// CHECK-NEW: call void @_ZN14DynamicDerivedC1Ev(%[[DynamicDerived:.*]]* {{[^,]*}} %[[THIS4]])
+// CHECK-NEW: %[[THIS3:.*]] = call ptr @llvm.launder.invariant.group.p0(ptr %[[THIS2:.*]])
+// CHECK-NEW: call void @_ZN14DynamicDerivedC1Ev(ptr {{[^,]*}} %[[THIS3]])
// CHECK-NEW-LABEL: {{^}}}
void Pointers1() {
DynamicBase1 *DB = new DynamicBase1;
@@ -108,9 +107,9 @@ void Pointers1() {
// CHECK-NEW-LABEL: define{{.*}} void @_Z14HackingObjectsv()
// CHECK-NEW: call void @_ZN12DynamicBase1C1Ev
-// CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(
// CHECK-NEW: call void @_ZN14DynamicDerivedC1Ev(
-// CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(
// CHECK-NEW: call void @_ZN12DynamicBase1C1Ev(
// CHECK-NEW-LABEL: {{^}}}
void HackingObjects() {
@@ -130,50 +129,40 @@ void HackingObjects() {
/*** Testing Constructors ***/
struct DynamicBase1;
// CHECK-CTORS-LABEL: define linkonce_odr void @_ZN12DynamicBase1C2Ev(
-// CHECK-CTORS-NOT: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-CTORS-NOT: call ptr @llvm.launder.invariant.group.p0(
// CHECK-CTORS-LABEL: {{^}}}
struct DynamicDerived;
// CHECK-CTORS-LABEL: define linkonce_odr void @_ZN14DynamicDerivedC2Ev(
-// CHECK-CTORS: %[[THIS0:.*]] = load %[[DynamicDerived:.*]]*, %[[DynamicDerived]]** {{.*}}
-// CHECK-CTORS: %[[THIS1:.*]] = bitcast %[[DynamicDerived:.*]]* %[[THIS0]] to i8*
-// CHECK-CTORS: %[[THIS2:.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* %[[THIS1:.*]])
-// CHECK-CTORS: %[[THIS3:.*]] = bitcast i8* %[[THIS2]] to %[[DynamicDerived]]*
-// CHECK-CTORS: %[[THIS4:.*]] = bitcast %[[DynamicDerived]]* %[[THIS3]] to %[[DynamicBase:.*]]*
-// CHECK-CTORS: call void @_ZN12DynamicBase1C2Ev(%[[DynamicBase]]* {{[^,]*}} %[[THIS4]])
-
-// CHECK-CTORS: %[[THIS5:.*]] = bitcast %struct.DynamicDerived* %[[THIS0]] to i32 (...)***
-// CHECK-CTORS: store {{.*}} %[[THIS5]]
+// CHECK-CTORS: %[[THIS0:.*]] = load ptr, ptr {{.*}}
+// CHECK-CTORS: %[[THIS2:.*]] = call ptr @llvm.launder.invariant.group.p0(ptr %[[THIS1:.*]])
+// CHECK-CTORS: call void @_ZN12DynamicBase1C2Ev(ptr {{[^,]*}} %[[THIS2]])
+
+// CHECK-CTORS: store {{.*}} %[[THIS0]]
// CHECK-CTORS-LABEL: {{^}}}
struct DynamicDerivedMultiple;
// CHECK-CTORS-LABEL: define linkonce_odr void @_ZN22DynamicDerivedMultipleC2Ev(
-// CHECK-CTORS: %[[THIS0:.*]] = load %[[CLASS:.*]]*, %[[CLASS]]** {{.*}}
-// CHECK-CTORS: %[[THIS1:.*]] = bitcast %[[CLASS:.*]]* %[[THIS0]] to i8*
-// CHECK-CTORS: %[[THIS2:.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* %[[THIS1]])
-// CHECK-CTORS: %[[THIS3:.*]] = bitcast i8* %[[THIS2]] to %[[CLASS]]*
-// CHECK-CTORS: %[[THIS4:.*]] = bitcast %[[CLASS]]* %[[THIS3]] to %[[BASE_CLASS:.*]]*
-// CHECK-CTORS: call void @_ZN12DynamicBase1C2Ev(%[[BASE_CLASS]]* {{[^,]*}} %[[THIS4]])
+// CHECK-CTORS: %[[THIS0:.*]] = load ptr, ptr {{.*}}
+// CHECK-CTORS: %[[THIS2:.*]] = call ptr @llvm.launder.invariant.group.p0(ptr %[[THIS0]])
+// CHECK-CTORS: call void @_ZN12DynamicBase1C2Ev(ptr {{[^,]*}} %[[THIS2]])
-// CHECK-CTORS: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-CTORS: call ptr @llvm.launder.invariant.group.p0(
// CHECK-CTORS: call void @_ZN12DynamicBase2C2Ev(
-// CHECK-CTORS-NOT: @llvm.launder.invariant.group.p0i8
+// CHECK-CTORS-NOT: @llvm.launder.invariant.group.p0
-// CHECK-CTORS: %[[THIS10:.*]] = bitcast %struct.DynamicDerivedMultiple* %[[THIS0]] to i32 (...)***
-// CHECK-CTORS: store {{.*}} @_ZTV22DynamicDerivedMultiple, i32 0, inrange i32 0, i32 2) {{.*}} %[[THIS10]]
-// CHECK-CTORS: %[[THIS11:.*]] = bitcast %struct.DynamicDerivedMultiple* %[[THIS0]] to i8*
-// CHECK-CTORS: %[[THIS_ADD:.*]] = getelementptr inbounds i8, i8* %[[THIS11]], i64 16
-// CHECK-CTORS: %[[THIS12:.*]] = bitcast i8* %[[THIS_ADD]] to i32 (...)***
+// CHECK-CTORS: store {{.*}} @_ZTV22DynamicDerivedMultiple, i32 0, inrange i32 0, i32 2), {{.*}} %[[THIS0]]
+// CHECK-CTORS: %[[THIS_ADD:.*]] = getelementptr inbounds i8, ptr %[[THIS0]], i64 16
-// CHECK-CTORS: store {{.*}} @_ZTV22DynamicDerivedMultiple, i32 0, inrange i32 1, i32 2) {{.*}} %[[THIS12]]
+// CHECK-CTORS: store {{.*}} @_ZTV22DynamicDerivedMultiple, i32 0, inrange i32 1, i32 2), {{.*}} %[[THIS_ADD]]
// CHECK-CTORS-LABEL: {{^}}}
struct DynamicFromStatic;
// CHECK-CTORS-LABEL: define linkonce_odr void @_ZN17DynamicFromStaticC2Ev(
-// CHECK-CTORS-NOT: @llvm.launder.invariant.group.p0i8(
+// CHECK-CTORS-NOT: @llvm.launder.invariant.group.p0(
// CHECK-CTORS-LABEL: {{^}}}
struct A {
@@ -203,15 +192,15 @@ void g2(A *a) {
void UnionsBarriers(U *u) {
// CHECK-NEW: call void @_Z9changeToBP1U(
changeToB(u);
- // CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(i8*
- // CHECK-NEW: call void @_Z2g2P1A(%struct.A*
+ // CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(ptr
+ // CHECK-NEW: call void @_Z2g2P1A(ptr
g2(&u->b);
- // CHECK-NEW: call void @_Z9changeToAP1U(%union.U*
+ // CHECK-NEW: call void @_Z9changeToAP1U(ptr
changeToA(u);
- // CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(i8*
- // call void @_Z2g2P1A(%struct.A* %a)
+ // CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(ptr
+ // call void @_Z2g2P1A(ptr %a)
g2(&u->a);
- // CHECK-NEW-NOT: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW-NOT: call ptr @llvm.launder.invariant.group.p0(ptr
}
struct HoldingVirtuals {
@@ -230,10 +219,10 @@ void take(AnotherEmpty &);
// CHECK-NEW-LABEL: noBarriers
void noBarriers(NoVptrs &noVptrs) {
- // CHECK-NEW-NOT: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW-NOT: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: 42
noVptrs.a += 42;
- // CHECK-NEW-NOT: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW-NOT: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: call void @_Z4takeR12AnotherEmpty(
take(noVptrs.empty);
}
@@ -246,10 +235,10 @@ void take(HoldingVirtuals &);
// CHECK-NEW-LABEL: define{{.*}} void @_Z15UnionsBarriers2R2U2
void UnionsBarriers2(U2 &u) {
- // CHECK-NEW-NOT: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW-NOT: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: 42
u.z += 42;
- // CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: call void @_Z4takeR15HoldingVirtuals(
take(u.h);
}
@@ -276,17 +265,17 @@ void take(VirtualInVBase &);
void take(VirtualInheritance &);
void UnionsBarrier3(U3 &u) {
- // CHECK-NEW-NOT: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW-NOT: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: 42
u.z += 42;
- // CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: call void @_Z4takeR13VirtualInBase(
take(u.v1);
- // CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: call void @_Z4takeR13VirtualInBase(
take(u.v2);
- // CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(ptr
// CHECK-NEW: call void @_Z4takeR18VirtualInheritance(
take(u.v3);
}
@@ -295,30 +284,26 @@ void UnionsBarrier3(U3 &u) {
void compare() {
A *a = new A;
a->foo();
- // CHECK-NEW: call i8* @llvm.launder.invariant.group.p0i8(i8*
+ // CHECK-NEW: call ptr @llvm.launder.invariant.group.p0(ptr
A *b = new (a) B;
- // CHECK-NEW: %[[a:.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8*
- // CHECK-NEW: %[[a2:.*]] = bitcast i8* %[[a]] to %struct.A*
- // CHECK-NEW: %[[b:.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8*
- // CHECK-NEW: %[[b2:.*]] = bitcast i8* %[[b]] to %struct.A*
- // CHECK-NEW: %cmp = icmp eq %struct.A* %[[a2]], %[[b2]]
+ // CHECK-NEW: %[[a:.*]] = call ptr @llvm.strip.invariant.group.p0(ptr
+ // CHECK-NEW: %[[b:.*]] = call ptr @llvm.strip.invariant.group.p0(ptr
+ // CHECK-NEW: %cmp = icmp eq ptr %[[a]], %[[b]]
if (a == b)
b->foo();
}
// CHECK-NEW-LABEL: compare2
bool compare2(A *a, A *a2) {
- // CHECK-NEW: %[[a:.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8*
- // CHECK-NEW: %[[a2:.*]] = bitcast i8* %[[a]] to %struct.A*
- // CHECK-NEW: %[[b:.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8*
- // CHECK-NEW: %[[b2:.*]] = bitcast i8* %[[b]] to %struct.A*
- // CHECK-NEW: %cmp = icmp ult %struct.A* %[[a2]], %[[b2]]
+ // CHECK-NEW: %[[a:.*]] = call ptr @llvm.strip.invariant.group.p0(ptr
+ // CHECK-NEW: %[[b:.*]] = call ptr @llvm.strip.invariant.group.p0(ptr
+ // CHECK-NEW: %cmp = icmp ult ptr %[[a]], %[[b]]
return a < a2;
}
// CHECK-NEW-LABEL: compareIntPointers
bool compareIntPointers(int *a, int *b) {
- // CHECK-NEW-NOT: call i8* @llvm.strip.invariant.group
+ // CHECK-NEW-NOT: call ptr @llvm.strip.invariant.group
return a == b;
}
@@ -330,12 +315,12 @@ struct HoldingOtherVirtuals {
// that are not dynamic.
// CHECK-NEW-LABEL: compare5
bool compare5(HoldingOtherVirtuals *a, HoldingOtherVirtuals *b) {
- // CHECK-NEW-NOT: call i8* @llvm.strip.invariant.group
+ // CHECK-NEW-NOT: call ptr @llvm.strip.invariant.group
return a == b;
}
// CHECK-NEW-LABEL: compareNull
bool compareNull(A *a) {
- // CHECK-NEW-NOT: call i8* @llvm.strip.invariant.group
+ // CHECK-NEW-NOT: call ptr @llvm.strip.invariant.group
if (a != nullptr)
return false;
@@ -349,24 +334,22 @@ struct X;
// objects
// CHECK-NEW-LABEL: define{{.*}} zeroext i1 @_Z8compare4P1XS0_
bool compare4(X *x, X *x2) {
- // CHECK-NEW: %[[x:.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8*
- // CHECK-NEW: %[[xp:.*]] = bitcast i8* %[[x]] to %struct.X*
- // CHECK-NEW: %[[x2:.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8*
- // CHECK-NEW: %[[x2p:.*]] = bitcast i8* %[[x2]] to %struct.X*
- // CHECK-NEW: %cmp = icmp eq %struct.X* %[[xp]], %[[x2p]]
+ // CHECK-NEW: %[[x:.*]] = call ptr @llvm.strip.invariant.group.p0(ptr
+ // CHECK-NEW: %[[x2:.*]] = call ptr @llvm.strip.invariant.group.p0(ptr
+ // CHECK-NEW: %cmp = icmp eq ptr %[[x]], %[[x2]]
return x == x2;
}
// CHECK-NEW-LABEL: define{{.*}} void @_Z7member1P20HoldingOtherVirtuals(
void member1(HoldingOtherVirtuals *p) {
- // CHECK-NEW-NOT: call i8* @llvm.strip.invariant.group.p0i8(
+ // CHECK-NEW-NOT: call ptr @llvm.strip.invariant.group.p0(
(void)p->b;
}
// CHECK-NEW-LABEL: member2
void member2(A *a) {
- // CHECK-NEW: call i8* @llvm.strip.invariant.group.p0i8
+ // CHECK-NEW: call ptr @llvm.strip.invariant.group.p0
(void)a->m;
}
@@ -374,50 +357,45 @@ void member2(A *a) {
// of ap and bp.
// CHECK-NEW-LABEL: @_Z18testCompareMembersv(
void testCompareMembers() {
- // CHECK-NEW: [[AP:%.*]] = alloca %struct.A*
- // CHECK-NEW: [[APM:%.*]] = alloca i32*
- // CHECK-NEW: [[BP:%.*]] = alloca %struct.B*
- // CHECK-NEW: [[BPM:%.*]] = alloca i32*
+ // CHECK-NEW: [[AP:%.*]] = alloca ptr
+ // CHECK-NEW: [[APM:%.*]] = alloca ptr
+ // CHECK-NEW: [[BP:%.*]] = alloca ptr
+ // CHECK-NEW: [[BPM:%.*]] = alloca ptr
A *ap = new A;
- // CHECK-NEW: call void %{{.*}}(%struct.A* {{[^,]*}} %{{.*}})
+ // CHECK-NEW: call void %{{.*}}(ptr {{[^,]*}} %{{.*}})
ap->foo();
- // CHECK-NEW: [[TMP7:%.*]] = load %struct.A*, %struct.A** [[AP]]
- // CHECK-NEW: [[TMP8:%.*]] = bitcast %struct.A* [[TMP7]] to i8*
- // CHECK-NEW: [[TMP9:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* [[TMP8]])
- // CHECK-NEW: [[TMP10:%.*]] = bitcast i8* [[TMP9]] to %struct.A*
- // CHECK-NEW: [[M:%.*]] = getelementptr inbounds [[STRUCT_A:%.*]], %struct.A* [[TMP10]], i32 0, i32 1
- // CHECK-NEW: store i32* [[M]], i32** [[APM]]
+ // CHECK-NEW: [[TMP7:%.*]] = load ptr, ptr [[AP]]
+ // CHECK-NEW: [[TMP9:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr [[TMP7]])
+ // CHECK-NEW: [[M:%.*]] = getelementptr inbounds [[STRUCT_A:%.*]], ptr [[TMP9]], i32 0, i32 1
+ // CHECK-NEW: store ptr [[M]], ptr [[APM]]
int *const apm = &ap->m;
B *bp = new (ap) B;
- // CHECK-NEW: [[TMP20:%.*]] = load %struct.B*, %struct.B** [[BP]]
- // CHECK-NEW: [[TMP21:%.*]] = bitcast %struct.B* [[TMP20]] to %struct.A*
- // CHECK-NEW: [[TMP22:%.*]] = bitcast %struct.A* [[TMP21]] to i8*
- // CHECK-NEW: [[TMP23:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* [[TMP22]])
- // CHECK-NEW: [[TMP24:%.*]] = bitcast i8* [[TMP23]] to %struct.A*
- // CHECK-NEW: [[M4:%.*]] = getelementptr inbounds [[STRUCT_A]], %struct.A* [[TMP24]], i32 0, i32 1
- // CHECK-NEW: store i32* [[M4]], i32** [[BPM]]
+ // CHECK-NEW: [[TMP20:%.*]] = load ptr, ptr [[BP]]
+ // CHECK-NEW: [[TMP23:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr [[TMP20]])
+ // CHECK-NEW: [[M4:%.*]] = getelementptr inbounds [[STRUCT_A]], ptr [[TMP23]], i32 0, i32 1
+ // CHECK-NEW: store ptr [[M4]], ptr [[BPM]]
int *const bpm = &bp->m;
- // CHECK-NEW: [[TMP25:%.*]] = load i32*, i32** [[APM]]
- // CHECK-NEW: [[TMP26:%.*]] = load i32*, i32** [[BPM]]
+ // CHECK-NEW: [[TMP25:%.*]] = load ptr, ptr [[APM]]
+ // CHECK-NEW: [[TMP26:%.*]] = load ptr, ptr [[BPM]]
// CHECK-NEW-NOT: strip.invariant.group
// CHECK-NEW-NOT: launder.invariant.group
- // CHECK-NEW: [[CMP:%.*]] = icmp eq i32* [[TMP25]], [[TMP26]]
+ // CHECK-NEW: [[CMP:%.*]] = icmp eq ptr [[TMP25]], [[TMP26]]
if (apm == bpm) {
bp->foo();
}
}
-// CHECK-NEW-LABEL: define{{.*}} void @_Z9testCast1P1A(%struct.A*
+// CHECK-NEW-LABEL: define{{.*}} void @_Z9testCast1P1A(ptr
void testCast1(A *a) {
// Here we get rid of dynamic info
- // CHECK-NEW: call i8* @llvm.strip.invariant.group
+ // CHECK-NEW: call ptr @llvm.strip.invariant.group
auto *v = (void *)a;
- // CHECK-NEW: call i8* @llvm.strip.invariant.group
+ // CHECK-NEW: call ptr @llvm.strip.invariant.group
auto i2 = (uintptr_t)a;
(void)i2;
@@ -429,13 +407,13 @@ void testCast1(A *a) {
}
struct Incomplete;
-// CHECK-NEW-LABEL: define{{.*}} void @_Z9testCast2P10Incomplete(%struct.Incomplete*
+// CHECK-NEW-LABEL: define{{.*}} void @_Z9testCast2P10Incomplete(ptr
void testCast2(Incomplete *I) {
// Here we get rid of potential dynamic info
- // CHECK-NEW: call i8* @llvm.strip.invariant.group
+ // CHECK-NEW: call ptr @llvm.strip.invariant.group
auto *v = (void *)I;
- // CHECK-NEW: call i8* @llvm.strip.invariant.group
+ // CHECK-NEW: call ptr @llvm.strip.invariant.group
auto i2 = (uintptr_t)I;
(void)i2;
@@ -561,7 +539,7 @@ void testCast9(PossiblyDerivingFromDynamicBase<Incomplete> *P) {
/** DTORS **/
// CHECK-DTORS-LABEL: define linkonce_odr void @_ZN10StaticBaseD2Ev(
-// CHECK-DTORS-NOT: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-DTORS-NOT: call ptr @llvm.launder.invariant.group.p0(
// CHECK-DTORS-LABEL: {{^}}}
// CHECK-DTORS-LABEL: define linkonce_odr void @_ZN25DynamicFromVirtualStatic2D2Ev(
@@ -569,21 +547,21 @@ void testCast9(PossiblyDerivingFromDynamicBase<Incomplete> *P) {
// CHECK-DTORS-LABEL: {{^}}}
// CHECK-DTORS-LABEL: define linkonce_odr void @_ZN17DynamicFromStaticD2Ev
-// CHECK-DTORS-NOT: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-DTORS-NOT: call ptr @llvm.launder.invariant.group.p0(
// CHECK-DTORS-LABEL: {{^}}}
// CHECK-DTORS-LABEL: define linkonce_odr void @_ZN22DynamicDerivedMultipleD2Ev(
// CHECK-DTORS-LABEL: define linkonce_odr void @_ZN12DynamicBase2D2Ev(
-// CHECK-DTORS: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-DTORS: call ptr @llvm.launder.invariant.group.p0(
// CHECK-DTORS-LABEL: {{^}}}
// CHECK-DTORS-LABEL: define linkonce_odr void @_ZN12DynamicBase1D2Ev
-// CHECK-DTORS: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-DTORS: call ptr @llvm.launder.invariant.group.p0(
// CHECK-DTORS-LABEL: {{^}}}
// CHECK-DTORS-LABEL: define linkonce_odr void @_ZN14DynamicDerivedD2Ev
-// CHECK-DTORS-NOT: call i8* @llvm.launder.invariant.group.p0i8(
+// CHECK-DTORS-NOT: call ptr @llvm.launder.invariant.group.p0(
// CHECK-DTORS-LABEL: {{^}}}
// CHECK-LINK-REQ: !llvm.module.flags = !{![[FIRST:[0-9]+]], ![[SEC:[0-9]+]]{{.*}}}
diff --git a/clang/test/CodeGenCXX/tail-padding.cpp b/clang/test/CodeGenCXX/tail-padding.cpp
index 311d5293ef1db..df6f400e860ed 100644
--- a/clang/test/CodeGenCXX/tail-padding.cpp
+++ b/clang/test/CodeGenCXX/tail-padding.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// PR36992
namespace Implicit {
@@ -11,8 +11,8 @@ namespace Implicit {
// CHECK: define {{.*}} @_ZN8Implicit1CC1EOS0_
// CHECK: call {{.*}} @_ZN8Implicit1AC2ERKS0_(
// Note: this must memcpy 7 bytes, not 8, to avoid trampling over the virtual base class.
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{32|64}}(i8* {{.*}}, i8* {{.*}}, i{{32|64}} 7, i1 false)
- // CHECK: store i32 {{.*}} @_ZTVN8Implicit1CE
+ // CHECK: call void @llvm.memcpy.p0.p0.i{{32|64}}(ptr {{.*}}, ptr {{.*}}, i{{32|64}} 7, i1 false)
+ // CHECK: store ptr {{.*}} @_ZTVN8Implicit1CE
}
namespace InitWithinNVSize {
@@ -28,8 +28,8 @@ namespace InitWithinNVSize {
// CHECK: define {{.*}} @_ZN16InitWithinNVSize1CC1EOS0_
// CHECK: call {{.*}} @_ZN16InitWithinNVSize1AC2ERKS0_(
// This copies over the 'C::x' member, but that's OK because we've not initialized it yet.
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{32|64}}(i8* {{.*}}, i8* {{.*}}, i{{32|64}} 8, i1 false)
- // CHECK: store i32 {{.*}} @_ZTVN16InitWithinNVSize1CE
+ // CHECK: call void @llvm.memcpy.p0.p0.i{{32|64}}(ptr {{.*}}, ptr {{.*}}, i{{32|64}} 8, i1 false)
+ // CHECK: store ptr {{.*}} @_ZTVN16InitWithinNVSize1CE
// CHECK: store i8
}
@@ -45,24 +45,24 @@ namespace NoUniqueAddr {
// CHECK: define {{.*}} @_ZN12NoUniqueAddr1CC1EOS0_
// CHECK: call {{.*}} @_ZN12NoUniqueAddr1AC2ERKS0_(
- // CHECK: store i32 {{.*}} @_ZTVN12NoUniqueAddr1CE
+ // CHECK: store ptr {{.*}} @_ZTVN12NoUniqueAddr1CE
// Copy the full size of B.
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{32|64}}(i8* {{.*}}, i8* {{.*}}, i{{32|64}} 8, i1 false)
+ // CHECK: call void @llvm.memcpy.p0.p0.i{{32|64}}(ptr {{.*}}, ptr {{.*}}, i{{32|64}} 8, i1 false)
C f(C c) { return c; }
// CHECK: define {{.*}} @_ZN12NoUniqueAddr1DC1EOS0_
// CHECK: call {{.*}} @_ZN12NoUniqueAddr1AC2ERKS0_(
- // CHECK: store i32 {{.*}} @_ZTVN12NoUniqueAddr1DE
+ // CHECK: store ptr {{.*}} @_ZTVN12NoUniqueAddr1DE
// Copy just the data size of B, to avoid overwriting the A base class.
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{32|64}}(i8* {{.*}}, i8* {{.*}}, i{{32|64}} 7, i1 false)
+ // CHECK: call void @llvm.memcpy.p0.p0.i{{32|64}}(ptr {{.*}}, ptr {{.*}}, i{{32|64}} 7, i1 false)
D f(D d) { return d; }
// CHECK: define {{.*}} @_ZN12NoUniqueAddr1EC1EOS0_
// CHECK: call {{.*}} @_ZN12NoUniqueAddr1AC2ERKS0_(
- // CHECK: store i32 {{.*}} @_ZTVN12NoUniqueAddr1EE
+ // CHECK: store ptr {{.*}} @_ZTVN12NoUniqueAddr1EE
// We can copy the full size of B here. (As it happens, we fold the copy of 'x' into
// this memcpy, so we're copying 8 bytes either way.)
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{32|64}}(i8* {{.*}}, i8* {{.*}}, i{{32|64}} 8, i1 false)
+ // CHECK: call void @llvm.memcpy.p0.p0.i{{32|64}}(ptr {{.*}}, ptr {{.*}}, i{{32|64}} 8, i1 false)
E f(E e) { return e; }
struct F : virtual A {
@@ -72,7 +72,7 @@ namespace NoUniqueAddr {
// CHECK: define {{.*}} @_ZN12NoUniqueAddr1FC1ERKS0_
// CHECK: call {{.*}} @_ZN12NoUniqueAddr1AC2ERKS0_(
- // CHECK: store i32 {{.*}} @_ZTVN12NoUniqueAddr1FE
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{32|64}}(i8* {{.*}}, i8* {{.*}}, i{{32|64}} 7, i1 false)
+ // CHECK: store ptr {{.*}} @_ZTVN12NoUniqueAddr1FE
+ // CHECK: call void @llvm.memcpy.p0.p0.i{{32|64}}(ptr {{.*}}, ptr {{.*}}, i{{32|64}} 7, i1 false)
F f(F x) { return x; }
}
diff --git a/clang/test/CodeGenCXX/template-param-objects.cpp b/clang/test/CodeGenCXX/template-param-objects.cpp
index cc6089bb38ac9..e36b27185b526 100644
--- a/clang/test/CodeGenCXX/template-param-objects.cpp
+++ b/clang/test/CodeGenCXX/template-param-objects.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -std=c++20 %s -emit-llvm -o - | FileCheck %s --check-prefixes=ITANIUM,CHECK
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows -std=c++20 %s -emit-llvm -o - | FileCheck %s --check-prefixes=MSABI,CHECK
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++20 %s -emit-llvm -o - | FileCheck %s --check-prefixes=ITANIUM,CHECK
+// RUN: %clang_cc1 -triple x86_64-windows -std=c++20 %s -emit-llvm -o - | FileCheck %s --check-prefixes=MSABI,CHECK
struct S { char buf[32]; };
template<S s> constexpr const char *begin() { return s.buf; }
@@ -11,9 +11,9 @@ template<S s> constexpr const char *end() { return s.buf + __builtin_strlen(s.bu
// ITANIUM: @p
// MSABI: @"?p@@3PEBDEB"
-// CHECK-SAME: global i8* getelementptr inbounds ({{.*}}* [[HELLO]], i32 0, i32 0, i32 0, i32 0)
+// CHECK-SAME: global ptr [[HELLO]]
const char *p = begin<S{"hello world"}>();
// ITANIUM: @q
// MSABI: @"?q@@3PEBDEB"
-// CHECK-SAME: global i8* getelementptr ({{.*}}* [[HELLO]], i32 0, i32 0, i32 0, i64 11)
+// CHECK-SAME: global ptr getelementptr (i8, ptr [[HELLO]], i64 11)
const char *q = end<S{"hello world"}>();
diff --git a/clang/test/CodeGenCXX/temporaries.cpp b/clang/test/CodeGenCXX/temporaries.cpp
index 4d735a61599c5..568051a36fe48 100644
--- a/clang/test/CodeGenCXX/temporaries.cpp
+++ b/clang/test/CodeGenCXX/temporaries.cpp
@@ -1,32 +1,32 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -std=c++11 | FileCheck %s -check-prefixes=CHECK,NULL-INVALID,CHECK-CXX11
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -std=c++17 | FileCheck %s -check-prefixes=CHECK,NULL-INVALID,CHECK-CXX17
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -std=c++11 -fno-delete-null-pointer-checks | FileCheck %s -check-prefixes=CHECK,NULL-VALID,CHECK-CXX11
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -std=c++11 | FileCheck %s -check-prefixes=CHECK,NULL-INVALID,CHECK-CXX11
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -std=c++17 | FileCheck %s -check-prefixes=CHECK,NULL-INVALID,CHECK-CXX17
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -std=c++11 -fno-delete-null-pointer-checks | FileCheck %s -check-prefixes=CHECK,NULL-VALID,CHECK-CXX11
namespace PR16263 {
const unsigned int n = 1234;
extern const int &r = (const int&)n;
// CHECK: @_ZGRN7PR162631rE_ = internal constant i32 1234,
- // CHECK: @_ZN7PR162631rE ={{.*}} constant i32* @_ZGRN7PR162631rE_,
+ // CHECK: @_ZN7PR162631rE ={{.*}} constant ptr @_ZGRN7PR162631rE_,
extern const int &s = reinterpret_cast<const int&>(n);
// CHECK: @_ZN7PR16263L1nE = internal constant i32 1234, align 4
- // CHECK: @_ZN7PR162631sE ={{.*}} constant i32* @_ZN7PR16263L1nE, align 8
+ // CHECK: @_ZN7PR162631sE ={{.*}} constant ptr @_ZN7PR16263L1nE, align 8
struct A { int n; };
struct B { int n; };
struct C : A, B {};
extern const A &&a = (A&&)(A&&)(C&&)(C{});
// CHECK: @_ZGRN7PR162631aE_ = internal global {{.*}} zeroinitializer,
- // CHECK: @_ZN7PR162631aE ={{.*}} constant {{.*}} bitcast ({{.*}}* @_ZGRN7PR162631aE_ to
+ // CHECK: @_ZN7PR162631aE ={{.*}} constant {{.*}} @_ZGRN7PR162631aE_
extern const int &&t = ((B&&)C{}).n;
// CHECK: @_ZGRN7PR162631tE_ = internal global {{.*}} zeroinitializer,
- // CHECK: @_ZN7PR162631tE ={{.*}} constant i32* {{.*}}* @_ZGRN7PR162631tE_ {{.*}} 4
+ // CHECK: @_ZN7PR162631tE ={{.*}} constant ptr {{.*}} @_ZGRN7PR162631tE_, {{.*}} 4
struct D { double d; C c; };
extern const int &&u = (123, static_cast<B&&>(0, ((D&&)D{}).*&D::c).n);
// CHECK: @_ZGRN7PR162631uE_ = internal global {{.*}} zeroinitializer
- // CHECK: @_ZN7PR162631uE ={{.*}} constant i32* {{.*}} @_ZGRN7PR162631uE_ {{.*}} 12
+ // CHECK: @_ZN7PR162631uE ={{.*}} constant ptr {{.*}} @_ZGRN7PR162631uE_, {{.*}} 12
}
namespace PR20227 {
@@ -50,7 +50,7 @@ namespace BraceInit {
// CHECK-CXX11: @_ZGRN9BraceInit1xE_ = internal constant i32 3
// FIXME: This should still be emitted as 'constant' in C++17.
// CHECK-CXX17: @_ZGRN9BraceInit1xE_ = internal global i32 3
- // CHECK: @_ZN9BraceInit1xE ={{.*}} constant i32* @_ZGRN9BraceInit1xE_
+ // CHECK: @_ZN9BraceInit1xE ={{.*}} constant ptr @_ZGRN9BraceInit1xE_
}
namespace RefTempSubobject {
@@ -59,7 +59,7 @@ namespace RefTempSubobject {
int ints[3] = {1, 2, 3};
};
- // CHECK: @_ZGRN16RefTempSubobject2srE_ = internal global { i32*, [3 x i32] } { {{.*}} getelementptr {{.*}} @_ZGRN16RefTempSubobject2srE_ {{.*}}, [3 x i32] [i32 1, i32 2, i32 3] }
+ // CHECK: @_ZGRN16RefTempSubobject2srE_ = internal global { ptr, [3 x i32] } { {{.*}} getelementptr {{.*}} @_ZGRN16RefTempSubobject2srE_, {{.*}}, [3 x i32] [i32 1, i32 2, i32 3] }
// CHECK: @_ZN16RefTempSubobject2srE = constant {{.*}} @_ZGRN16RefTempSubobject2srE_
constexpr const SelfReferential &sr = SelfReferential();
}
@@ -333,7 +333,7 @@ int& f(int);
void g() {
// CHECK: call void @_ZN3T121AC1Ev
// CHECK-NEXT: call noundef i32 @_ZN3T121A1fEv(
- // CHECK-NEXT: call noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_ZN3T121fEi(
+ // CHECK-NEXT: call noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN3T121fEi(
// CHECK-NEXT: call void @_ZN3T121AD1Ev(
int& i = f(A().f());
}
@@ -348,8 +348,8 @@ namespace PR6648 {
struct D;
D& zed(B);
void foobar() {
- // NULL-INVALID: call noundef nonnull align 1 %"struct.PR6648::D"* @_ZN6PR66483zedENS_1BE
- // NULL-VALID: call noundef align 1 %"struct.PR6648::D"* @_ZN6PR66483zedENS_1BE
+ // NULL-INVALID: call noundef nonnull align 1 ptr @_ZN6PR66483zedENS_1BE
+ // NULL-VALID: call noundef align 1 ptr @_ZN6PR66483zedENS_1BE
zed(foo);
}
}
@@ -381,10 +381,10 @@ namespace PR7556 {
void foo() {
// CHECK: call void @_ZN6PR75561AD1Ev
A();
- // CHECK: call void @llvm.memset.p0i8.i64
+ // CHECK: call void @llvm.memset.p0.i64
// CHECK: call void @_ZN6PR75561BD1Ev
B();
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+ // CHECK: call void @llvm.memcpy.p0.p0.i64
// CHECK: call void @_ZN6PR75561CD1Ev
C();
// CHECK-NEXT: ret void
@@ -411,22 +411,22 @@ namespace Elision {
// CHECK-NEXT: [[T1:%.*]] = alloca [[A]], align 8
// CHECK-NEXT: call void @_ZN7Elision3fooEv()
- // CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[I]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[I]])
A i = (foo(), A());
- // CHECK-NEXT: call void @_ZN7Elision4fooAEv([[A]]* sret([[A]]) align 8 [[T0]])
- // CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[J]])
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[T0]])
+ // CHECK-NEXT: call void @_ZN7Elision4fooAEv(ptr sret([[A]]) align 8 [[T0]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[J]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[T0]])
A j = (fooA(), A());
- // CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[T1]])
- // CHECK-NEXT: call void @_ZN7Elision4fooAEv([[A]]* sret([[A]]) align 8 [[K]])
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[T1]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[T1]])
+ // CHECK-NEXT: call void @_ZN7Elision4fooAEv(ptr sret([[A]]) align 8 [[K]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[T1]])
A k = (A(), fooA());
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[K]])
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[J]])
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[I]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[K]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[J]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[I]])
}
@@ -435,35 +435,35 @@ namespace Elision {
// CHECK: [[I:%.*]] = alloca [[A]], align 8
// CHECK-NEXT: [[J:%.*]] = alloca [[A]], align 8
- // CHECK: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[I]])
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[I]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X:%.*]])
+ // CHECK: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[I]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[I]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X:%.*]])
A i = (c ? A() : x);
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[J]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X]])
- // CHECK: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[J]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[J]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X]])
+ // CHECK: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[J]])
A j = (c ? x : A());
- // CHECK: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[J]])
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[I]])
+ // CHECK: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[J]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[I]])
}
- // CHECK: define{{.*}} void @_ZN7Elision5test2Ev([[A]]* noalias sret([[A]]) align 8
+ // CHECK: define{{.*}} void @_ZN7Elision5test2Ev(ptr noalias sret([[A]]) align 8
A test2() {
// CHECK: call void @_ZN7Elision3fooEv()
- // CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[RET:%.*]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[RET:%.*]])
// CHECK-NEXT: ret void
return (foo(), A());
}
- // CHECK: define{{.*}} void @_ZN7Elision5test3EiNS_1AE([[A]]* noalias sret([[A]]) align 8
+ // CHECK: define{{.*}} void @_ZN7Elision5test3EiNS_1AE(ptr noalias sret([[A]]) align 8
A test3(int v, A x) {
if (v < 5)
- // CHECK: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[RET:%.*]])
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[RET]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X:%.*]])
+ // CHECK: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[RET:%.*]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[RET]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X:%.*]])
return (v < 0 ? A() : x);
else
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[RET]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X]])
- // CHECK: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[RET]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[RET]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X]])
+ // CHECK: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[RET]])
return (v > 10 ? x : A());
// CHECK: ret void
@@ -474,29 +474,29 @@ namespace Elision {
// CHECK: [[X:%.*]] = alloca [[A]], align 8
// CHECK-NEXT: [[XS:%.*]] = alloca [2 x [[A]]], align 16
- // CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[X]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[X]])
A x;
- // CHECK-NEXT: [[XS0:%.*]] = getelementptr inbounds [2 x [[A]]], [2 x [[A]]]* [[XS]], i64 0, i64 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* {{[^,]*}} [[XS0]])
- // CHECK-NEXT: [[XS1:%.*]] = getelementptr inbounds [[A]], [[A]]* [[XS0]], i64 1
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[XS1]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X]])
+ // CHECK-NEXT: [[XS0:%.*]] = getelementptr inbounds [2 x [[A]]], ptr [[XS]], i64 0, i64 0
+ // CHECK-NEXT: call void @_ZN7Elision1AC1Ev(ptr {{[^,]*}} [[XS0]])
+ // CHECK-NEXT: [[XS1:%.*]] = getelementptr inbounds [[A]], ptr [[XS0]], i64 1
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[XS1]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[X]])
A xs[] = { A(), x };
- // CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [2 x [[A]]], [2 x [[A]]]* [[XS]], i32 0, i32 0
- // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 2
+ // CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [2 x [[A]]], ptr [[XS]], i32 0, i32 0
+ // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], ptr [[BEGIN]], i64 2
// CHECK-NEXT: br label
- // CHECK: [[AFTER:%.*]] = phi [[A]]*
- // CHECK-NEXT: [[CUR:%.*]] = getelementptr inbounds [[A]], [[A]]* [[AFTER]], i64 -1
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[CUR]])
- // CHECK-NEXT: [[T0:%.*]] = icmp eq [[A]]* [[CUR]], [[BEGIN]]
+ // CHECK: [[AFTER:%.*]] = phi ptr
+ // CHECK-NEXT: [[CUR:%.*]] = getelementptr inbounds [[A]], ptr [[AFTER]], i64 -1
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[CUR]])
+ // CHECK-NEXT: [[T0:%.*]] = icmp eq ptr [[CUR]], [[BEGIN]]
// CHECK-NEXT: br i1 [[T0]],
- // CHECK: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[X]])
+ // CHECK: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[X]])
}
// rdar://problem/8433352
- // CHECK: define{{.*}} void @_ZN7Elision5test5Ev([[A]]* noalias sret([[A]]) align 8
+ // CHECK: define{{.*}} void @_ZN7Elision5test5Ev(ptr noalias sret([[A]]) align 8
struct B { A a; B(); };
A test5() {
// CHECK: [[AT0:%.*]] = alloca [[A]], align 8
@@ -505,38 +505,38 @@ namespace Elision {
// CHECK-NEXT: [[BT1:%.*]] = alloca [[B]], align 8
// CHECK-NEXT: [[BT2:%.*]] = alloca [[B]], align 8
- // CHECK: call void @_ZN7Elision1BC1Ev([[B]]* {{[^,]*}} [[BT0]])
- // CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]], [[B]]* [[BT0]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[AT0]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AM]])
- // CHECK-NEXT: call void @_ZN7Elision5takeAENS_1AE([[A]]* noundef [[AT0]])
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[AT0]])
- // CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* {{[^,]*}} [[BT0]])
+ // CHECK: call void @_ZN7Elision1BC1Ev(ptr {{[^,]*}} [[BT0]])
+ // CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]], ptr [[BT0]], i32 0, i32 0
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[AT0]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision5takeAENS_1AE(ptr noundef [[AT0]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[AT0]])
+ // CHECK-NEXT: call void @_ZN7Elision1BD1Ev(ptr {{[^,]*}} [[BT0]])
takeA(B().a);
- // CHECK-NEXT: call void @_ZN7Elision1BC1Ev([[B]]* {{[^,]*}} [[BT1]])
- // CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]], [[B]]* [[BT1]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[X]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AM]])
- // CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* {{[^,]*}} [[BT1]])
+ // CHECK-NEXT: call void @_ZN7Elision1BC1Ev(ptr {{[^,]*}} [[BT1]])
+ // CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]], ptr [[BT1]], i32 0, i32 0
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[X]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1BD1Ev(ptr {{[^,]*}} [[BT1]])
A x = B().a;
- // CHECK-NEXT: call void @_ZN7Elision1BC1Ev([[B]]* {{[^,]*}} [[BT2]])
- // CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]], [[B]]* [[BT2]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* {{[^,]*}} [[RET:%.*]], [[A]]* noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AM]])
- // CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* {{[^,]*}} [[BT2]])
+ // CHECK-NEXT: call void @_ZN7Elision1BC1Ev(ptr {{[^,]*}} [[BT2]])
+ // CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]], ptr [[BT2]], i32 0, i32 0
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_(ptr {{[^,]*}} [[RET:%.*]], ptr noundef {{(nonnull )?}}align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1BD1Ev(ptr {{[^,]*}} [[BT2]])
return B().a;
- // CHECK: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[X]])
+ // CHECK: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[X]])
}
// Reduced from webkit.
- // CHECK: define{{.*}} void @_ZN7Elision5test6EPKNS_1CE([[C:%.*]]*
+ // CHECK: define{{.*}} void @_ZN7Elision5test6EPKNS_1CE(ptr
struct C { operator A() const; };
void test6(const C *x) {
// CHECK: [[T0:%.*]] = alloca [[A]], align 8
- // CHECK: [[X:%.*]] = load [[C]]*, [[C]]** {{%.*}}, align 8
- // CHECK-NEXT: call void @_ZNK7Elision1CcvNS_1AEEv([[A]]* sret([[A]]) align 8 [[T0]], [[C]]* {{[^,]*}} [[X]])
- // CHECK-NEXT: call void @_ZNK7Elision1A3fooEv([[A]]* {{[^,]*}} [[T0]])
- // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* {{[^,]*}} [[T0]])
+ // CHECK: [[X:%.*]] = load ptr, ptr {{%.*}}, align 8
+ // CHECK-NEXT: call void @_ZNK7Elision1CcvNS_1AEEv(ptr sret([[A]]) align 8 [[T0]], ptr {{[^,]*}} [[X]])
+ // CHECK-NEXT: call void @_ZNK7Elision1A3fooEv(ptr {{[^,]*}} [[T0]])
+ // CHECK-NEXT: call void @_ZN7Elision1AD1Ev(ptr {{[^,]*}} [[T0]])
// CHECK-NEXT: ret void
A(*x).foo();
}
@@ -550,22 +550,22 @@ namespace PR8623 {
// CHECK: [[TMP:%.*]] = alloca [[A:%.*]], align 1
// CHECK-NEXT: [[LCONS:%.*]] = alloca i1
// CHECK-NEXT: [[RCONS:%.*]] = alloca i1
- // CHECK: store i1 false, i1* [[LCONS]]
- // CHECK-NEXT: store i1 false, i1* [[RCONS]]
+ // CHECK: store i1 false, ptr [[LCONS]]
+ // CHECK-NEXT: store i1 false, ptr [[RCONS]]
// CHECK-NEXT: br i1
- // CHECK: call void @_ZN6PR86231AC1Ei([[A]]* {{[^,]*}} [[TMP]], i32 noundef 2)
- // CHECK-NEXT: store i1 true, i1* [[LCONS]]
+ // CHECK: call void @_ZN6PR86231AC1Ei(ptr {{[^,]*}} [[TMP]], i32 noundef 2)
+ // CHECK-NEXT: store i1 true, ptr [[LCONS]]
// CHECK-NEXT: br label
- // CHECK: call void @_ZN6PR86231AC1Ei([[A]]* {{[^,]*}} [[TMP]], i32 noundef 3)
- // CHECK-NEXT: store i1 true, i1* [[RCONS]]
+ // CHECK: call void @_ZN6PR86231AC1Ei(ptr {{[^,]*}} [[TMP]], i32 noundef 3)
+ // CHECK-NEXT: store i1 true, ptr [[RCONS]]
// CHECK-NEXT: br label
- // CHECK: load i1, i1* [[RCONS]]
+ // CHECK: load i1, ptr [[RCONS]]
// CHECK-NEXT: br i1
- // CHECK: call void @_ZN6PR86231AD1Ev([[A]]* {{[^,]*}} [[TMP]])
+ // CHECK: call void @_ZN6PR86231AD1Ev(ptr {{[^,]*}} [[TMP]])
// CHECK-NEXT: br label
- // CHECK: load i1, i1* [[LCONS]]
+ // CHECK: load i1, ptr [[LCONS]]
// CHECK-NEXT: br i1
- // CHECK: call void @_ZN6PR86231AD1Ev([[A]]* {{[^,]*}} [[TMP]])
+ // CHECK: call void @_ZN6PR86231AD1Ev(ptr {{[^,]*}} [[TMP]])
// CHECK-NEXT: br label
// CHECK: ret void
b ? A(2) : A(3);
@@ -577,14 +577,14 @@ namespace PR11365 {
// CHECK-LABEL: define{{.*}} void @_ZN7PR113653fooEv(
void foo() {
- // CHECK: [[BEGIN:%.*]] = getelementptr inbounds [3 x [[A:%.*]]], [3 x [[A:%.*]]]* {{.*}}, i32 0, i32 0
- // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 3
+ // CHECK: [[BEGIN:%.*]] = getelementptr inbounds [3 x [[A:%.*]]], ptr {{.*}}, i32 0, i32 0
+ // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], ptr [[BEGIN]], i64 3
// CHECK-NEXT: br label
// CHECK: [[PHI:%.*]] = phi
- // CHECK-NEXT: [[ELEM:%.*]] = getelementptr inbounds [[A]], [[A]]* [[PHI]], i64 -1
- // CHECK-NEXT: call void @_ZN7PR113651AD1Ev([[A]]* {{[^,]*}} [[ELEM]])
- // CHECK-NEXT: icmp eq [[A]]* [[ELEM]], [[BEGIN]]
+ // CHECK-NEXT: [[ELEM:%.*]] = getelementptr inbounds [[A]], ptr [[PHI]], i64 -1
+ // CHECK-NEXT: call void @_ZN7PR113651AD1Ev(ptr {{[^,]*}} [[ELEM]])
+ // CHECK-NEXT: icmp eq ptr [[ELEM]], [[BEGIN]]
// CHECK-NEXT: br i1
(void) (A [3]) {};
}
@@ -621,14 +621,14 @@ namespace BindToSubobject {
void f(), g();
// CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1aE_)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1aE_ to i8*), i8* @__dso_handle)
- // CHECK: store i32* getelementptr inbounds ({{.*}} @_ZGRN15BindToSubobject1aE_, i32 0, i32 0), i32** @_ZN15BindToSubobject1aE, align 8
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN15BindToSubobject1AD1Ev, ptr @_ZGRN15BindToSubobject1aE_, ptr @__dso_handle)
+ // CHECK: store ptr @_ZGRN15BindToSubobject1aE_, ptr @_ZN15BindToSubobject1aE, align 8
int &&a = A().a;
// CHECK: call void @_ZN15BindToSubobject1fEv()
// CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1bE_)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1bE_ to i8*), i8* @__dso_handle)
- // CHECK: store i32* getelementptr inbounds ({{.*}} @_ZGRN15BindToSubobject1bE_, i32 0, i32 0), i32** @_ZN15BindToSubobject1bE, align 8
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN15BindToSubobject1AD1Ev, ptr @_ZGRN15BindToSubobject1bE_, ptr @__dso_handle)
+ // CHECK: store ptr @_ZGRN15BindToSubobject1bE_, ptr @_ZN15BindToSubobject1bE, align 8
int &&b = (f(), A().a);
int A::*h();
@@ -636,10 +636,10 @@ namespace BindToSubobject {
// CHECK: call void @_ZN15BindToSubobject1fEv()
// CHECK: call void @_ZN15BindToSubobject1gEv()
// CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1cE_)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1cE_ to i8*), i8* @__dso_handle)
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN15BindToSubobject1AD1Ev, ptr @_ZGRN15BindToSubobject1cE_, ptr @__dso_handle)
// CHECK: call {{.*}} @_ZN15BindToSubobject1hE
// CHECK: getelementptr
- // CHECK: store i32* {{.*}}, i32** @_ZN15BindToSubobject1cE, align 8
+ // CHECK: store ptr {{.*}}, ptr @_ZN15BindToSubobject1cE, align 8
int &&c = (f(), (g(), A().*h()));
struct B {
@@ -648,10 +648,10 @@ namespace BindToSubobject {
};
// CHECK: call void @_ZN15BindToSubobject1BC1Ev({{.*}} @_ZGRN15BindToSubobject1dE_)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1BD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1dE_ to i8*), i8* @__dso_handle)
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN15BindToSubobject1BD1Ev, ptr @_ZGRN15BindToSubobject1dE_, ptr @__dso_handle)
// CHECK: call {{.*}} @_ZN15BindToSubobject1hE
// CHECK: getelementptr {{.*}} getelementptr
- // CHECK: store i32* {{.*}}, i32** @_ZN15BindToSubobject1dE, align 8
+ // CHECK: store ptr {{.*}}, ptr @_ZN15BindToSubobject1dE, align 8
int &&d = (B().a).*h();
}
@@ -661,9 +661,9 @@ namespace Bitfield {
// Do not lifetime extend the S() temporary here.
// CHECK: alloca
// CHECK: call {{.*}}memset
- // CHECK: store i32 {{.*}}, i32* @_ZGRN8Bitfield1rE_
+ // CHECK: store i32 {{.*}}, ptr @_ZGRN8Bitfield1rE_
// CHECK: call void @_ZN8Bitfield1SD1
- // CHECK: store i32* @_ZGRN8Bitfield1rE_, i32** @_ZN8Bitfield1rE, align 8
+ // CHECK: store ptr @_ZGRN8Bitfield1rE_, ptr @_ZN8Bitfield1rE, align 8
int &&r = S().a;
}
@@ -676,14 +676,14 @@ namespace Vector {
};
// CHECK: alloca
// CHECK: extractelement
- // CHECK: store i32 {{.*}}, i32* @_ZGRN6Vector1rE_
- // CHECK: store i32* @_ZGRN6Vector1rE_, i32** @_ZN6Vector1rE,
+ // CHECK: store i32 {{.*}}, ptr @_ZGRN6Vector1rE_
+ // CHECK: store ptr @_ZGRN6Vector1rE_, ptr @_ZN6Vector1rE,
int &&r = S().v[1];
// CHECK: alloca
// CHECK: extractelement
- // CHECK: store i32 {{.*}}, i32* @_ZGRN6Vector1sE_
- // CHECK: store i32* @_ZGRN6Vector1sE_, i32** @_ZN6Vector1sE,
+ // CHECK: store i32 {{.*}}, ptr @_ZGRN6Vector1sE_
+ // CHECK: store ptr @_ZGRN6Vector1sE_, ptr @_ZN6Vector1sE,
int &&s = S().w[1];
// FIXME PR16204: The following code leads to an assertion in Sema.
//int &&s = S().w.y;
@@ -715,29 +715,29 @@ namespace MultipleExtension {
E &&e1 = { A(), B(), D().c };
// CHECK: call void @_ZN17MultipleExtension1AC1Ev({{.*}} @[[TEMPA:_ZGRN17MultipleExtension2e1E.*]])
- // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1AD1Ev {{.*}} @[[TEMPA]]
- // CHECK: store {{.*}} @[[TEMPA]], {{.*}} getelementptr inbounds ({{.*}} @[[TEMPE:_ZGRN17MultipleExtension2e1E.*]], i32 0, i32 0)
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1AD1Ev, {{.*}} @[[TEMPA]]
+ // CHECK: store {{.*}} @[[TEMPA]], {{.*}} @[[TEMPE:_ZGRN17MultipleExtension2e1E.*]],
// CHECK: call void @_ZN17MultipleExtension1BC1Ev({{.*}} getelementptr inbounds ({{.*}} @[[TEMPE]], i32 0, i32 1))
// CHECK: call void @_ZN17MultipleExtension1DC1Ev({{.*}} @[[TEMPD:_ZGRN17MultipleExtension2e1E.*]])
- // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1DD1Ev {{.*}} @[[TEMPD]]
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1DD1Ev, {{.*}} @[[TEMPD]]
// CHECK: store {{.*}} @[[TEMPD]], {{.*}} getelementptr inbounds ({{.*}} @[[TEMPE]], i32 0, i32 2)
- // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1ED1Ev {{.*}} @[[TEMPE]]
- // CHECK: store {{.*}} @[[TEMPE]], %"struct.MultipleExtension::E"** @_ZN17MultipleExtension2e1E, align 8
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1ED1Ev, {{.*}} @[[TEMPE]]
+ // CHECK: store {{.*}} @[[TEMPE]], ptr @_ZN17MultipleExtension2e1E, align 8
E e2 = { A(), B(), D().c };
// CHECK: call void @_ZN17MultipleExtension1AC1Ev({{.*}} @[[TEMPA:_ZGRN17MultipleExtension2e2E.*]])
- // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1AD1Ev {{.*}} @[[TEMPA]]
- // CHECK: store {{.*}} @[[TEMPA]], {{.*}} getelementptr inbounds ({{.*}} @[[E:_ZN17MultipleExtension2e2E]], i32 0, i32 0)
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1AD1Ev, {{.*}} @[[TEMPA]]
+ // CHECK: store {{.*}} @[[TEMPA]], {{.*}} @[[E:_ZN17MultipleExtension2e2E]]
// CHECK: call void @_ZN17MultipleExtension1BC1Ev({{.*}} getelementptr inbounds ({{.*}} @[[E]], i32 0, i32 1))
// CHECK: call void @_ZN17MultipleExtension1DC1Ev({{.*}} @[[TEMPD:_ZGRN17MultipleExtension2e2E.*]])
- // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1DD1Ev {{.*}} @[[TEMPD]]
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1DD1Ev, {{.*}} @[[TEMPD]]
// CHECK: store {{.*}} @[[TEMPD]], {{.*}} getelementptr inbounds ({{.*}} @[[E]], i32 0, i32 2)
- // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1ED1Ev {{.*}} @[[E]]
+ // CHECK: call i32 @__cxa_atexit({{.*}} @_ZN17MultipleExtension1ED1Ev, {{.*}} @[[E]]
void g();
@@ -767,7 +767,7 @@ namespace MultipleExtension {
// CHECK: %[[TEMPE2_C:.*]] = getelementptr inbounds {{.*}} %[[E2]], i32 0, i32 2
// CHECK: call void @[[NS]]1DC1Ev({{.*}} %[[TEMPD2:.*]])
// CHECK: %[[TEMPD2_C:.*]] = getelementptr inbounds {{.*}} %[[TEMPD2]], i32 0, i32 1
- // CHECK: store {{.*}} %[[TEMPD2_C]], {{.*}}* %[[TEMPE2_C]]
+ // CHECK: store {{.*}} %[[TEMPD2_C]], ptr %[[TEMPE2_C]]
g();
// CHECK: call void @[[NS]]1gEv()
@@ -828,16 +828,16 @@ namespace Conditional {
// CHECK-LABEL: define {{.*}} @_ZN11Conditional1fEb(
void f(bool b) {
- // CHECK: store i1 false, i1* %[[CLEANUP_B:.*]],
- // CHECK: store i1 false, i1* %[[CLEANUP_C:.*]],
+ // CHECK: store i1 false, ptr %[[CLEANUP_B:.*]],
+ // CHECK: store i1 false, ptr %[[CLEANUP_C:.*]],
// CHECK: br i1
//
// CHECK: call {{.*}} @_ZN11Conditional1BC1Ev(
- // CHECK: store i1 true, i1* %[[CLEANUP_B]],
+ // CHECK: store i1 true, ptr %[[CLEANUP_B]],
// CHECK: br label
//
// CHECK: call {{.*}} @_ZN11Conditional1CC1Ev(
- // CHECK: store i1 true, i1* %[[CLEANUP_C]],
+ // CHECK: store i1 true, ptr %[[CLEANUP_C]],
// CHECK: br label
A &&r = b ? static_cast<A&&>(B()) : static_cast<A&&>(C());
@@ -858,16 +858,16 @@ namespace Conditional {
struct D { A &&a; };
// CHECK-LABEL: define {{.*}} @_ZN11Conditional10f_indirectEb(
void f_indirect(bool b) {
- // CHECK: store i1 false, i1* %[[CLEANUP_B:.*]],
- // CHECK: store i1 false, i1* %[[CLEANUP_C:.*]],
+ // CHECK: store i1 false, ptr %[[CLEANUP_B:.*]],
+ // CHECK: store i1 false, ptr %[[CLEANUP_C:.*]],
// CHECK: br i1
//
// CHECK: call {{.*}} @_ZN11Conditional1BC1Ev(
- // CHECK: store i1 true, i1* %[[CLEANUP_B]],
+ // CHECK: store i1 true, ptr %[[CLEANUP_B]],
// CHECK: br label
//
// CHECK: call {{.*}} @_ZN11Conditional1CC1Ev(
- // CHECK: store i1 true, i1* %[[CLEANUP_C]],
+ // CHECK: store i1 true, ptr %[[CLEANUP_C]],
// CHECK: br label
D d = b ? D{B()} : D{C()};
@@ -899,11 +899,11 @@ namespace Conditional {
// CHECK: br i1
//
// CHECK: call {{.*}} @_ZN11Conditional1BC1Ev({{.*}} @_ZGRN11Conditional1rE_)
- // CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN11Conditional1BD1Ev {{.*}} @_ZGRN11Conditional1rE_,
+ // CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN11Conditional1BD1Ev, ptr @_ZGRN11Conditional1rE_,
// CHECK: br label
//
// CHECK: call {{.*}} @_ZN11Conditional1CC1Ev({{.*}} @_ZGRN11Conditional1rE0_)
- // CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN11Conditional1CD1Ev {{.*}} @_ZGRN11Conditional1rE0_,
+ // CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN11Conditional1CD1Ev, ptr @_ZGRN11Conditional1rE0_,
// CHECK: br label
A &&r = b ? static_cast<A&&>(B()) : static_cast<A&&>(C());
}
diff --git a/clang/test/CodeGenCXX/throw-expressions.cpp b/clang/test/CodeGenCXX/throw-expressions.cpp
index 31086f70b1c25..d8801fe887d4e 100644
--- a/clang/test/CodeGenCXX/throw-expressions.cpp
+++ b/clang/test/CodeGenCXX/throw-expressions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fcxx-exceptions -fexceptions -Wno-unreachable-code -Werror -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -Wno-unreachable-code -Werror -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
int val = 42;
int& test1() {
@@ -34,7 +34,7 @@ int test5(bool x, bool y, int z) {
// CHECK: br i1
//
// y.true:
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
// CHECK: br label
//
// y.false:
@@ -58,7 +58,7 @@ int test6(bool x, bool y, int z) {
// CHECK: br i1
//
// y.true:
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
// CHECK: br label
//
// y.false:
@@ -77,7 +77,7 @@ namespace DR1560 {
// CHECK-LABEL: @_ZN6DR15601bE
const A &r = b ? get() : throw 0;
// CHECK-NOT: call {{.*}}@_ZN6DR15601AD1Ev
- // CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN6DR15601AD1Ev {{.*}} @_ZGRN6DR15601rE
+ // CHECK: call {{.*}} @__cxa_atexit(ptr @_ZN6DR15601AD1Ev, ptr @_ZGRN6DR15601rE
// CHECK-NOT: call {{.*}}@_ZN6DR15601AD1Ev
// PR28184
@@ -103,7 +103,7 @@ void test7(bool cond) {
cond ? throw test7 : val;
}
-// CHECK-LABEL: define{{.*}} nonnull align 4 dereferenceable(4) i32* @_Z5test8b(
+// CHECK-LABEL: define{{.*}} nonnull align 4 dereferenceable(4) ptr @_Z5test8b(
int &test8(bool cond) {
// CHECK: br i1
//
@@ -115,6 +115,6 @@ int &test8(bool cond) {
// CHECK-NEXT: unreachable
//
// end:
- // CHECK: ret i32* @val
+ // CHECK: ret ptr @val
return cond ? val : ((throw "foo"));
}
diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp
index 55ee0827b11fd..f1ceebf24ba18 100644
--- a/clang/test/CodeGenCXX/thunks.cpp
+++ b/clang/test/CodeGenCXX/thunks.cpp
@@ -1,18 +1,18 @@
// Sparc64 doesn't support musttail (yet), so it uses method cloning for
// variadic thunks. Use it for testing.
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=sparc64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - \
+// RUN: %clang_cc1 %s -triple=sparc64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - \
// RUN: | FileCheck --check-prefixes=CHECK,CHECK-CLONE,CHECK-NONOPT %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=sparc64-pc-linux-gnu -debug-info-kind=standalone -dwarf-version=5 -funwind-tables=2 -emit-llvm -o - \
+// RUN: %clang_cc1 %s -triple=sparc64-pc-linux-gnu -debug-info-kind=standalone -dwarf-version=5 -funwind-tables=2 -emit-llvm -o - \
// RUN: | FileCheck --check-prefixes=CHECK,CHECK-CLONE,CHECK-NONOPT,CHECK-DBG %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=sparc64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes \
+// RUN: %clang_cc1 %s -triple=sparc64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes \
// RUN: | FileCheck --check-prefixes=CHECK,CHECK-CLONE,CHECK-OPT %s
// Test x86_64, which uses musttail for variadic thunks.
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes \
+// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes \
// RUN: | FileCheck --check-prefixes=CHECK,CHECK-TAIL,CHECK-OPT %s
// Finally, reuse these tests for the MS ABI.
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-windows-msvc -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes \
+// RUN: %clang_cc1 %s -triple=x86_64-windows-msvc -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes \
// RUN: | FileCheck --check-prefixes=WIN64 %s
@@ -40,7 +40,7 @@ struct C : A, B {
//
// WIN64-LABEL: define dso_local void @"?f at C@Test1@@UEAAXXZ"(
// WIN64-LABEL: define linkonce_odr dso_local void @"?f at C@Test1@@W7EAAXXZ"(
-// WIN64: getelementptr i8, i8* {{.*}}, i32 -8
+// WIN64: getelementptr i8, ptr {{.*}}, i32 -8
// WIN64: ret void
void C::f() { }
@@ -87,8 +87,8 @@ struct B : A {
virtual V2 *f();
};
-// CHECK: define{{.*}} %{{.*}}* @_ZTch0_v0_n24_N5Test31B1fEv(
-// WIN64: define weak_odr dso_local noundef %{{.*}} @"?f at B@Test3@@QEAAPEAUV1 at 2@XZ"(
+// CHECK: define{{.*}} ptr @_ZTch0_v0_n24_N5Test31B1fEv(
+// WIN64: define weak_odr dso_local noundef ptr @"?f at B@Test3@@QEAAPEAUV1 at 2@XZ"(
V2 *B::f() { return 0; }
}
@@ -269,12 +269,12 @@ namespace Test8 {
struct B { virtual void bar(NonPOD); };
struct C : A, B { virtual void bar(NonPOD); static void helper(NonPOD); };
- // CHECK: define{{.*}} void @_ZN5Test81C6helperENS_6NonPODE([[NONPODTYPE:%.*]]*
+ // CHECK: define{{.*}} void @_ZN5Test81C6helperENS_6NonPODE(ptr
void C::helper(NonPOD var) {}
// CHECK-LABEL: define{{.*}} void @_ZThn8_N5Test81C3barENS_6NonPODE(
// CHECK-DBG-NOT: dbg.declare
- // CHECK-NOT: load [[NONPODTYPE]], [[NONPODTYPE]]*
+ // CHECK-NOT: load [[NONPODTYPE:%.*]], ptr
// CHECK-NOT: memcpy
// CHECK: ret void
void C::bar(NonPOD var) {}
@@ -327,15 +327,15 @@ namespace Test11 {
// CHECK-DBG-NOT: dbg.declare
// CHECK: ret
- // WIN64-LABEL: define dso_local noundef %{{.*}}* @"?f at C@Test11@@UEAAPEAU12 at XZ"(i8*
+ // WIN64-LABEL: define dso_local noundef ptr @"?f at C@Test11@@UEAAPEAU12 at XZ"(ptr
- // WIN64-LABEL: define weak_odr dso_local noundef %{{.*}}* @"?f at C@Test11@@QEAAPEAUA at 2@XZ"(i8*
- // WIN64: call noundef %{{.*}}* @"?f at C@Test11@@UEAAPEAU12 at XZ"(i8* noundef %{{.*}})
+ // WIN64-LABEL: define weak_odr dso_local noundef ptr @"?f at C@Test11@@QEAAPEAUA at 2@XZ"(ptr
+ // WIN64: call noundef ptr @"?f at C@Test11@@UEAAPEAU12 at XZ"(ptr noundef %{{.*}})
//
// Match the vbtable return adjustment.
- // WIN64: load i32*, i32** %{{[^,]*}}, align 8
- // WIN64: getelementptr inbounds i32, i32* %{{[^,]*}}, i32 1
- // WIN64: load i32, i32* %{{[^,]*}}, align 4
+ // WIN64: load ptr, ptr %{{[^,]*}}, align 8
+ // WIN64: getelementptr inbounds i32, ptr %{{[^,]*}}, i32 1
+ // WIN64: load i32, ptr %{{[^,]*}}, align 4
}
// Varargs thunk test.
@@ -360,8 +360,8 @@ namespace Test12 {
// are generated.
// CHECK: define {{.*}} @_ZTchn8_h8_N6Test121C1fEiz
// CHECK-DBG-NOT: dbg.declare
- // CHECK: getelementptr inbounds i8, i8* {{.*}}, i64 -8
- // CHECK: getelementptr inbounds i8, i8* {{.*}}, i64 8
+ // CHECK: getelementptr inbounds i8, ptr {{.*}}, i64 -8
+ // CHECK: getelementptr inbounds i8, ptr {{.*}}, i64 8
// The vtable layout goes:
// C vtable in A:
@@ -372,16 +372,16 @@ namespace Test12 {
// FIXME: The weak_odr linkage is probably not necessary and just an artifact
// of Itanium ABI details.
// WIN64-LABEL: define dso_local {{.*}} @"?f at C@Test12@@UEAAPEAU12 at HZZ"(
- // WIN64: call noundef %{{.*}}* @"?makeC at Test12@@YAPEAUC at 1@XZ"()
+ // WIN64: call noundef ptr @"?makeC at Test12@@YAPEAUC at 1@XZ"()
//
// This thunk needs return adjustment, clone.
// WIN64-LABEL: define weak_odr dso_local {{.*}} @"?f at C@Test12@@W7EAAPEAUB at 2@HZZ"(
- // WIN64: call noundef %{{.*}}* @"?makeC at Test12@@YAPEAUC at 1@XZ"()
- // WIN64: getelementptr inbounds i8, i8* %{{.*}}, i32 8
+ // WIN64: call noundef ptr @"?makeC at Test12@@YAPEAUC at 1@XZ"()
+ // WIN64: getelementptr inbounds i8, ptr %{{.*}}, i32 8
//
// Musttail call back to the A implementation after this adjustment from B to A.
- // WIN64-LABEL: define linkonce_odr dso_local noundef %{{.*}}* @"?f at C@Test12@@W7EAAPEAU12 at HZZ"(
- // WIN64: getelementptr i8, i8* %{{[^,]*}}, i32 -8
+ // WIN64-LABEL: define linkonce_odr dso_local noundef ptr @"?f at C@Test12@@W7EAAPEAU12 at HZZ"(
+ // WIN64: getelementptr i8, ptr %{{[^,]*}}, i32 -8
// WIN64: musttail call {{.*}} @"?f at C@Test12@@UEAAPEAU12 at HZZ"(
C c;
}
@@ -406,22 +406,22 @@ namespace Test13 {
}
// CHECK: define {{.*}} @_ZTcvn8_n32_v8_n24_N6Test131D4foo1Ev
// CHECK-DBG-NOT: dbg.declare
- // CHECK: getelementptr inbounds i8, i8* {{.*}}, i64 -8
- // CHECK: getelementptr inbounds i8, i8* {{.*}}, i64 -32
- // CHECK: getelementptr inbounds i8, i8* {{.*}}, i64 -24
- // CHECK: getelementptr inbounds i8, i8* {{.*}}, i64 8
- // CHECK: ret %"struct.Test13::D"*
+ // CHECK: getelementptr inbounds i8, ptr {{.*}}, i64 -8
+ // CHECK: getelementptr inbounds i8, ptr {{.*}}, i64 -32
+ // CHECK: getelementptr inbounds i8, ptr {{.*}}, i64 -24
+ // CHECK: getelementptr inbounds i8, ptr {{.*}}, i64 8
+ // CHECK: ret ptr
- // WIN64-LABEL: define weak_odr dso_local noundef %"struct.Test13::D"* @"?foo1 at D@Test13@@$4PPPPPPPE at A@EAAAEAUB1 at 2@XZ"(
+ // WIN64-LABEL: define weak_odr dso_local noundef ptr @"?foo1 at D@Test13@@$4PPPPPPPE at A@EAAAEAUB1 at 2@XZ"(
// This adjustment.
- // WIN64: getelementptr inbounds i8, i8* {{.*}}, i64 -12
+ // WIN64: getelementptr inbounds i8, ptr {{.*}}, i64 -12
// Call implementation.
- // WIN64: call {{.*}} @"?foo1 at D@Test13@@UEAAAEAU12 at XZ"(i8* {{.*}})
+ // WIN64: call {{.*}} @"?foo1 at D@Test13@@UEAAAEAU12 at XZ"(ptr {{.*}})
// Virtual + nonvirtual return adjustment.
- // WIN64: load i32*, i32** %{{[^,]*}}, align 8
- // WIN64: getelementptr inbounds i32, i32* %{{[^,]*}}, i32 1
- // WIN64: load i32, i32* %{{[^,]*}}, align 4
- // WIN64: getelementptr inbounds i8, i8* %{{[^,]*}}, i32 %{{[^,]*}}
+ // WIN64: load ptr, ptr %{{[^,]*}}, align 8
+ // WIN64: getelementptr inbounds i32, ptr %{{[^,]*}}, i32 1
+ // WIN64: load i32, ptr %{{[^,]*}}, align 4
+ // WIN64: getelementptr inbounds i8, ptr %{{[^,]*}}, i32 %{{[^,]*}}
}
namespace Test14 {
@@ -464,7 +464,7 @@ namespace Test15 {
// If we have musttail, then we emit the thunk as available_externally.
// CHECK-TAIL: declare void @_ZN6Test151C1fEiz
// CHECK-TAIL: define available_externally void @_ZThn8_N6Test151C1fEiz({{.*}})
- // CHECK-TAIL: musttail call void (%"struct.Test15::C"*, i32, ...) @_ZN6Test151C1fEiz({{.*}}, ...)
+ // CHECK-TAIL: musttail call void (ptr, i32, ...) @_ZN6Test151C1fEiz({{.*}}, ...)
// MS C++ ABI doesn't use a thunk, so this case isn't interesting.
}
@@ -506,13 +506,13 @@ C c;
// CHECK-CLONE-LABEL: declare void @_ZThn8_N6Test171C1fEPKcz(
// CHECK-TAIL-LABEL: define available_externally void @_ZThn8_N6Test171C1fEPKcz(
-// CHECK-TAIL: getelementptr inbounds i8, i8* %{{.*}}, i64 -8
+// CHECK-TAIL: getelementptr inbounds i8, ptr %{{.*}}, i64 -8
// CHECK-TAIL: musttail call {{.*}} @_ZN6Test171C1fEPKcz({{.*}}, ...)
// MSVC-LABEL: define linkonce_odr dso_local void @"?f at C@Test17@@G7EAAXPEBDZZ"
-// MSVC-SAME: (%"class.Test17::C"* %this, i8* %[[ARG:[^,]+]], ...)
-// MSVC: getelementptr i8, i8* %{{.*}}, i32 -8
-// MSVC: musttail call void (%"class.Test17::C"*, i8*, ...) @"?f at C@Test17@@EEAAXPEBDZZ"(%"class.Test17::C"* %{{.*}}, i8* noundef %[[ARG]], ...)
+// MSVC-SAME: (ptr %this, ptr %[[ARG:[^,]+]], ...)
+// MSVC: getelementptr i8, ptr %{{.*}}, i32 -8
+// MSVC: musttail call void (ptr, ptr, ...) @"?f at C@Test17@@EEAAXPEBDZZ"(ptr %{{.*}}, ptr noundef %[[ARG]], ...)
}
/**** The following has to go at the end of the file ****/
@@ -529,7 +529,7 @@ C c;
// CHECK-NONOPT-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv
// Checking with opt
-// CHECK-OPT-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(%"struct.Test4B::(anonymous namespace)::C"* noundef %this) unnamed_addr #1 align 2
+// CHECK-OPT-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(ptr noundef %this) unnamed_addr #1 align 2
// This is from Test5:
// CHECK-OPT-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv
diff --git a/clang/test/CodeGenCXX/trivial-auto-var-init.cpp b/clang/test/CodeGenCXX/trivial-auto-var-init.cpp
index 5852cb417bb69..eed9868cad07f 100644
--- a/clang/test/CodeGenCXX/trivial-auto-var-init.cpp
+++ b/clang/test/CodeGenCXX/trivial-auto-var-init.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s -check-prefix=UNINIT
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefix=ZERO
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s -check-prefix=UNINIT
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefix=ZERO
// None of the synthesized globals should contain `undef`.
// PATTERN-NOT: undef
@@ -12,9 +12,9 @@ extern "C" {
// UNINIT-LABEL: test_selfinit(
// ZERO-LABEL: test_selfinit(
-// ZERO: store i32 0, i32* %self, align 4, !annotation [[AUTO_INIT:!.+]]
+// ZERO: store i32 0, ptr %self, align 4, !annotation [[AUTO_INIT:!.+]]
// PATTERN-LABEL: test_selfinit(
-// PATTERN: store i32 -1431655766, i32* %self, align 4, !annotation [[AUTO_INIT:!.+]]
+// PATTERN: store i32 -1431655766, ptr %self, align 4, !annotation [[AUTO_INIT:!.+]]
void test_selfinit() {
int self = self + 1;
used(self);
@@ -22,9 +22,9 @@ void test_selfinit() {
// UNINIT-LABEL: test_block(
// ZERO-LABEL: test_block(
-// ZERO: store i32 0, i32* %block, align 4, !annotation [[AUTO_INIT:!.+]]
+// ZERO: store i32 0, ptr %block, align 4, !annotation [[AUTO_INIT:!.+]]
// PATTERN-LABEL: test_block(
-// PATTERN: store i32 -1431655766, i32* %block, align 4, !annotation [[AUTO_INIT:!.+]]
+// PATTERN: store i32 -1431655766, ptr %block, align 4, !annotation [[AUTO_INIT:!.+]]
void test_block() {
__block int block;
used(block);
@@ -36,15 +36,15 @@ void test_block() {
//
// UNINIT-LABEL: test_block_self_init(
// ZERO-LABEL: test_block_self_init(
-// ZERO: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8
-// ZERO: %captured1 = getelementptr inbounds %struct.__block_byref_captured, %struct.__block_byref_captured* %captured, i32 0, i32 4
-// ZERO-NEXT: store %struct.XYZ* null, %struct.XYZ** %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
-// ZERO: %call = call %struct.XYZ* @create(
+// ZERO: %block = alloca <{ ptr, i32, i32, ptr, ptr, ptr }>, align 8
+// ZERO: %captured1 = getelementptr inbounds %struct.__block_byref_captured, ptr %captured, i32 0, i32 4
+// ZERO-NEXT: store ptr null, ptr %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
+// ZERO: %call = call ptr @create(
// PATTERN-LABEL: test_block_self_init(
-// PATTERN: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8
-// PATTERN: %captured1 = getelementptr inbounds %struct.__block_byref_captured, %struct.__block_byref_captured* %captured, i32 0, i32 4
-// PATTERN-NEXT: store %struct.XYZ* inttoptr (i64 -6148914691236517206 to %struct.XYZ*), %struct.XYZ** %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
-// PATTERN: %call = call %struct.XYZ* @create(
+// PATTERN: %block = alloca <{ ptr, i32, i32, ptr, ptr, ptr }>, align 8
+// PATTERN: %captured1 = getelementptr inbounds %struct.__block_byref_captured, ptr %captured, i32 0, i32 4
+// PATTERN-NEXT: store ptr inttoptr (i64 -6148914691236517206 to ptr), ptr %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
+// PATTERN: %call = call ptr @create(
using Block = void (^)();
typedef struct XYZ {
Block block;
@@ -60,15 +60,15 @@ void test_block_self_init() {
//
// UNINIT-LABEL: test_block_captures_self_after_init(
// ZERO-LABEL: test_block_captures_self_after_init(
-// ZERO: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8
-// ZERO: %captured1 = getelementptr inbounds %struct.__block_byref_captured.1, %struct.__block_byref_captured.1* %captured, i32 0, i32 4
-// ZERO-NEXT: store %struct.XYZ* null, %struct.XYZ** %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
-// ZERO: %call = call %struct.XYZ* @create(
+// ZERO: %block = alloca <{ ptr, i32, i32, ptr, ptr, ptr }>, align 8
+// ZERO: %captured1 = getelementptr inbounds %struct.__block_byref_captured.1, ptr %captured, i32 0, i32 4
+// ZERO-NEXT: store ptr null, ptr %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
+// ZERO: %call = call ptr @create(
// PATTERN-LABEL: test_block_captures_self_after_init(
-// PATTERN: %block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8
-// PATTERN: %captured1 = getelementptr inbounds %struct.__block_byref_captured.1, %struct.__block_byref_captured.1* %captured, i32 0, i32 4
-// PATTERN-NEXT: store %struct.XYZ* inttoptr (i64 -6148914691236517206 to %struct.XYZ*), %struct.XYZ** %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
-// PATTERN: %call = call %struct.XYZ* @create(
+// PATTERN: %block = alloca <{ ptr, i32, i32, ptr, ptr, ptr }>, align 8
+// PATTERN: %captured1 = getelementptr inbounds %struct.__block_byref_captured.1, ptr %captured, i32 0, i32 4
+// PATTERN-NEXT: store ptr inttoptr (i64 -6148914691236517206 to ptr), ptr %captured1, align 8, !annotation [[AUTO_INIT:!.+]]
+// PATTERN: %call = call ptr @create(
void test_block_captures_self_after_init() {
extern xyz_t create(Block block);
__block xyz_t captured;
@@ -97,13 +97,13 @@ void test_goto_unreachable_value() {
// ZERO-LABEL: test_goto(
// ZERO: if.then:
// ZERO: br label %jump
-// ZERO: store i32 0, i32* %oops, align 4, !annotation [[AUTO_INIT:!.+]]
+// ZERO: store i32 0, ptr %oops, align 4, !annotation [[AUTO_INIT:!.+]]
// ZERO: br label %jump
// ZERO: jump:
// PATTERN-LABEL: test_goto(
// PATTERN: if.then:
// PATTERN: br label %jump
-// PATTERN: store i32 -1431655766, i32* %oops, align 4, !annotation [[AUTO_INIT:!.+]]
+// PATTERN: store i32 -1431655766, ptr %oops, align 4, !annotation [[AUTO_INIT:!.+]]
// PATTERN: br label %jump
// PATTERN: jump:
void test_goto(int i) {
@@ -119,12 +119,12 @@ void test_goto(int i) {
// UNINIT-LABEL: test_switch(
// ZERO-LABEL: test_switch(
// ZERO: sw.bb:
-// ZERO-NEXT: store i32 0, i32* %oops, align 4, !annotation [[AUTO_INIT:!.+]]
+// ZERO-NEXT: store i32 0, ptr %oops, align 4, !annotation [[AUTO_INIT:!.+]]
// ZERO: sw.bb1:
// ZERO-NEXT: call void @{{.*}}used
// PATTERN-LABEL: test_switch(
// PATTERN: sw.bb:
-// PATTERN-NEXT: store i32 -1431655766, i32* %oops, align 4, !annotation [[AUTO_INIT:!.+]]
+// PATTERN-NEXT: store i32 -1431655766, ptr %oops, align 4, !annotation [[AUTO_INIT:!.+]]
// PATTERN: sw.bb1:
// PATTERN-NEXT: call void @{{.*}}used
void test_switch(int i) {
@@ -140,20 +140,19 @@ void test_switch(int i) {
// UNINIT-LABEL: test_vla(
// ZERO-LABEL: test_vla(
// ZERO: %[[SIZE:[0-9]+]] = mul nuw i64 %{{.*}}, 4
-// ZERO: call void @llvm.memset{{.*}}(i8* align 16 %{{.*}}, i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
+// ZERO: call void @llvm.memset{{.*}}(ptr align 16 %{{.*}}, i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
// PATTERN-LABEL: test_vla(
// PATTERN: %vla.iszerosized = icmp eq i64 %{{.*}}, 0
// PATTERN: br i1 %vla.iszerosized, label %vla-init.cont, label %vla-setup.loop
// PATTERN: vla-setup.loop:
// PATTERN: %[[SIZE:[0-9]+]] = mul nuw i64 %{{.*}}, 4
-// PATTERN: %vla.begin = bitcast i32* %vla to i8*
-// PATTERN: %vla.end = getelementptr inbounds i8, i8* %vla.begin, i64 %[[SIZE]]
+// PATTERN: %vla.end = getelementptr inbounds i8, ptr %vla, i64 %[[SIZE]]
// PATTERN: br label %vla-init.loop
// PATTERN: vla-init.loop:
-// PATTERN: %vla.cur = phi i8* [ %vla.begin, %vla-setup.loop ], [ %vla.next, %vla-init.loop ]
-// PATTERN: call void @llvm.memcpy{{.*}} %vla.cur, {{.*}}@__const.test_vla.vla {{.*}}), !annotation [[AUTO_INIT:!.+]]
-// PATTERN: %vla.next = getelementptr inbounds i8, i8* %vla.cur, i64 4
-// PATTERN: %vla-init.isdone = icmp eq i8* %vla.next, %vla.end
+// PATTERN: %vla.cur = phi ptr [ %vla, %vla-setup.loop ], [ %vla.next, %vla-init.loop ]
+// PATTERN: call void @llvm.memcpy{{.*}} %vla.cur, {{.*}}@__const.test_vla.vla{{.*}}), !annotation [[AUTO_INIT:!.+]]
+// PATTERN: %vla.next = getelementptr inbounds i8, ptr %vla.cur, i64 4
+// PATTERN: %vla-init.isdone = icmp eq ptr %vla.next, %vla.end
// PATTERN: br i1 %vla-init.isdone, label %vla-init.cont, label %vla-init.loop
// PATTERN: vla-init.cont:
// PATTERN: call void @{{.*}}used
@@ -177,11 +176,11 @@ void test_vla(int size) {
// ZERO-LABEL: test_alloca(
// ZERO: %[[SIZE:[a-z0-9]+]] = sext i32 %{{.*}} to i64
// ZERO-NEXT: %[[ALLOCA:[a-z0-9]+]] = alloca i8, i64 %[[SIZE]], align [[ALIGN:[0-9]+]]
-// ZERO-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %[[ALLOCA]], i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
+// ZERO-NEXT: call void @llvm.memset{{.*}}(ptr align [[ALIGN]] %[[ALLOCA]], i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
// PATTERN-LABEL: test_alloca(
// PATTERN: %[[SIZE:[a-z0-9]+]] = sext i32 %{{.*}} to i64
// PATTERN-NEXT: %[[ALLOCA:[a-z0-9]+]] = alloca i8, i64 %[[SIZE]], align [[ALIGN:[0-9]+]]
-// PATTERN-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %[[ALLOCA]], i8 -86, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
+// PATTERN-NEXT: call void @llvm.memset{{.*}}(ptr align [[ALIGN]] %[[ALLOCA]], i8 -86, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
void test_alloca(int size) {
void *ptr = __builtin_alloca(size);
used(ptr);
@@ -191,11 +190,11 @@ void test_alloca(int size) {
// ZERO-LABEL: test_alloca_with_align(
// ZERO: %[[SIZE:[a-z0-9]+]] = sext i32 %{{.*}} to i64
// ZERO-NEXT: %[[ALLOCA:[a-z0-9]+]] = alloca i8, i64 %[[SIZE]], align 128
-// ZERO-NEXT: call void @llvm.memset{{.*}}(i8* align 128 %[[ALLOCA]], i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
+// ZERO-NEXT: call void @llvm.memset{{.*}}(ptr align 128 %[[ALLOCA]], i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
// PATTERN-LABEL: test_alloca_with_align(
// PATTERN: %[[SIZE:[a-z0-9]+]] = sext i32 %{{.*}} to i64
// PATTERN-NEXT: %[[ALLOCA:[a-z0-9]+]] = alloca i8, i64 %[[SIZE]], align 128
-// PATTERN-NEXT: call void @llvm.memset{{.*}}(i8* align 128 %[[ALLOCA]], i8 -86, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
+// PATTERN-NEXT: call void @llvm.memset{{.*}}(ptr align 128 %[[ALLOCA]], i8 -86, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
void test_alloca_with_align(int size) {
void *ptr = __builtin_alloca_with_align(size, 1024);
used(ptr);
@@ -232,20 +231,19 @@ void test_alloca_with_align_uninitialized(int size) {
// UNINIT-LABEL: test_struct_vla(
// ZERO-LABEL: test_struct_vla(
// ZERO: %[[SIZE:[0-9]+]] = mul nuw i64 %{{.*}}, 16
-// ZERO: call void @llvm.memset{{.*}}(i8* align 16 %{{.*}}, i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
+// ZERO: call void @llvm.memset{{.*}}(ptr align 16 %{{.*}}, i8 0, i64 %[[SIZE]], i1 false), !annotation [[AUTO_INIT:!.+]]
// PATTERN-LABEL: test_struct_vla(
// PATTERN: %vla.iszerosized = icmp eq i64 %{{.*}}, 0
// PATTERN: br i1 %vla.iszerosized, label %vla-init.cont, label %vla-setup.loop
// PATTERN: vla-setup.loop:
// PATTERN: %[[SIZE:[0-9]+]] = mul nuw i64 %{{.*}}, 16
-// PATTERN: %vla.begin = bitcast %struct.anon* %vla to i8*
-// PATTERN: %vla.end = getelementptr inbounds i8, i8* %vla.begin, i64 %[[SIZE]]
+// PATTERN: %vla.end = getelementptr inbounds i8, ptr %vla, i64 %[[SIZE]]
// PATTERN: br label %vla-init.loop
// PATTERN: vla-init.loop:
-// PATTERN: %vla.cur = phi i8* [ %vla.begin, %vla-setup.loop ], [ %vla.next, %vla-init.loop ]
-// PATTERN: call void @llvm.memcpy{{.*}} %vla.cur, {{.*}}@__const.test_struct_vla.vla {{.*}}), !annotation [[AUTO_INIT:!.+]]
-// PATTERN: %vla.next = getelementptr inbounds i8, i8* %vla.cur, i64 16
-// PATTERN: %vla-init.isdone = icmp eq i8* %vla.next, %vla.end
+// PATTERN: %vla.cur = phi ptr [ %vla, %vla-setup.loop ], [ %vla.next, %vla-init.loop ]
+// PATTERN: call void @llvm.memcpy{{.*}} %vla.cur, {{.*}}@__const.test_struct_vla.vla{{.*}}), !annotation [[AUTO_INIT:!.+]]
+// PATTERN: %vla.next = getelementptr inbounds i8, ptr %vla.cur, i64 16
+// PATTERN: %vla-init.isdone = icmp eq ptr %vla.next, %vla.end
// PATTERN: br i1 %vla-init.isdone, label %vla-init.cont, label %vla-init.loop
// PATTERN: vla-init.cont:
// PATTERN: call void @{{.*}}used
@@ -310,10 +308,10 @@ void test_huge_small_init() {
// UNINIT-LABEL: test_huge_larger_init(
// ZERO-LABEL: test_huge_larger_init(
-// ZERO: call void @llvm.memcpy{{.*}} @__const.test_huge_larger_init.big, {{.*}}, i64 65536,
+// ZERO: call void @llvm.memcpy{{.*}} @__const.test_huge_larger_init.big, i64 65536,
// ZERO-NOT: !annotation
// PATTERN-LABEL: test_huge_larger_init(
-// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_huge_larger_init.big, {{.*}}, i64 65536,
+// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_huge_larger_init.big, i64 65536,
// PATTERN-NOT: !annotation
void test_huge_larger_init() {
char big[65536] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
diff --git a/clang/test/CodeGenCXX/trivial_abi.cpp b/clang/test/CodeGenCXX/trivial_abi.cpp
index f6e872a38cb53..3249df129157f 100644
--- a/clang/test/CodeGenCXX/trivial_abi.cpp
+++ b/clang/test/CodeGenCXX/trivial_abi.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios11 -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios11 -std=c++11 -fcxx-exceptions -fexceptions -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios11 -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios11 -std=c++11 -fcxx-exceptions -fexceptions -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s
-// CHECK: %[[STRUCT_SMALL:.*]] = type { i32* }
-// CHECK: %[[STRUCT_LARGE:.*]] = type { i32*, [128 x i32] }
+// CHECK: %[[STRUCT_SMALL:.*]] = type { ptr }
+// CHECK: %[[STRUCT_LARGE:.*]] = type { ptr, [128 x i32] }
// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { i32 }
// CHECK: %[[STRUCT_NONTRIVIAL:.*]] = type { i32 }
@@ -58,22 +58,22 @@ struct D0 : B0, B1 {
// CHECK-LABEL: define{{.*}} i64 @_ZThn8_N2D02m0Ev(
// CHECK: %[[RETVAL:.*]] = alloca %[[STRUCT_SMALL]], align 8
// CHECK: %[[CALL:.*]] = tail call i64 @_ZN2D02m0Ev(
-// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[RETVAL]], i32 0, i32 0
-// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[CALL]] to i32*
-// CHECK: store i32* %[[COERCE_VAL_IP]], i32** %[[COERCE_DIVE]], align 8
-// CHECK: %[[COERCE_DIVE2:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[RETVAL]], i32 0, i32 0
-// CHECK: %[[V3:.*]] = load i32*, i32** %[[COERCE_DIVE2]], align 8
-// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i32* %[[V3]] to i64
+// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[RETVAL]], i32 0, i32 0
+// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[CALL]] to ptr
+// CHECK: store ptr %[[COERCE_VAL_IP]], ptr %[[COERCE_DIVE]], align 8
+// CHECK: %[[COERCE_DIVE2:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[RETVAL]], i32 0, i32 0
+// CHECK: %[[V3:.*]] = load ptr, ptr %[[COERCE_DIVE2]], align 8
+// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint ptr %[[V3]] to i64
// CHECK: ret i64 %[[COERCE_VAL_PI]]
Small D0::m0() { return {}; }
// CHECK: define{{.*}} void @_Z14testParamSmall5Small(i64 %[[A_COERCE:.*]])
// CHECK: %[[A:.*]] = alloca %[[STRUCT_SMALL]], align 8
-// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[A]], i32 0, i32 0
-// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[A_COERCE]] to i32*
-// CHECK: store i32* %[[COERCE_VAL_IP]], i32** %[[COERCE_DIVE]], align 8
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_SMALL]]* @_ZN5SmallD1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[A]])
+// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[A]], i32 0, i32 0
+// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[A_COERCE]] to ptr
+// CHECK: store ptr %[[COERCE_VAL_IP]], ptr %[[COERCE_DIVE]], align 8
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN5SmallD1Ev(ptr {{[^,]*}} %[[A]])
// CHECK: ret void
// CHECK: }
@@ -82,10 +82,10 @@ void testParamSmall(Small a) noexcept {
// CHECK: define{{.*}} i64 @_Z15testReturnSmallv()
// CHECK: %[[RETVAL:.*]] = alloca %[[STRUCT_SMALL:.*]], align 8
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_SMALL]]* @_ZN5SmallC1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[RETVAL]])
-// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[RETVAL]], i32 0, i32 0
-// CHECK: %[[V0:.*]] = load i32*, i32** %[[COERCE_DIVE]], align 8
-// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i32* %[[V0]] to i64
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN5SmallC1Ev(ptr {{[^,]*}} %[[RETVAL]])
+// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[RETVAL]], i32 0, i32 0
+// CHECK: %[[V0:.*]] = load ptr, ptr %[[COERCE_DIVE]], align 8
+// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint ptr %[[V0]] to i64
// CHECK: ret i64 %[[COERCE_VAL_PI]]
// CHECK: }
@@ -97,13 +97,13 @@ Small testReturnSmall() {
// CHECK: define{{.*}} void @_Z14testCallSmall0v()
// CHECK: %[[T:.*]] = alloca %[[STRUCT_SMALL:.*]], align 8
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_SMALL]], align 8
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_SMALL]]* @_ZN5SmallC1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[T]])
-// CHECK: %[[CALL1:.*]] = call noundef %[[STRUCT_SMALL]]* @_ZN5SmallC1ERKS_(%[[STRUCT_SMALL]]* {{[^,]*}} %[[AGG_TMP]], %[[STRUCT_SMALL]]* noundef nonnull align 8 dereferenceable(8) %[[T]])
-// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[AGG_TMP]], i32 0, i32 0
-// CHECK: %[[V0:.*]] = load i32*, i32** %[[COERCE_DIVE]], align 8
-// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i32* %[[V0]] to i64
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN5SmallC1Ev(ptr {{[^,]*}} %[[T]])
+// CHECK: %[[CALL1:.*]] = call noundef ptr @_ZN5SmallC1ERKS_(ptr {{[^,]*}} %[[AGG_TMP]], ptr noundef nonnull align 8 dereferenceable(8) %[[T]])
+// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[AGG_TMP]], i32 0, i32 0
+// CHECK: %[[V0:.*]] = load ptr, ptr %[[COERCE_DIVE]], align 8
+// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint ptr %[[V0]] to i64
// CHECK: call void @_Z14testParamSmall5Small(i64 %[[COERCE_VAL_PI]])
-// CHECK: %[[CALL2:.*]] = call noundef %[[STRUCT_SMALL]]* @_ZN5SmallD1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[T]])
+// CHECK: %[[CALL2:.*]] = call noundef ptr @_ZN5SmallD1Ev(ptr {{[^,]*}} %[[T]])
// CHECK: ret void
// CHECK: }
@@ -115,12 +115,12 @@ void testCallSmall0() {
// CHECK: define{{.*}} void @_Z14testCallSmall1v()
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_SMALL:.*]], align 8
// CHECK: %[[CALL:.*]] = call i64 @_Z15testReturnSmallv()
-// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[AGG_TMP]], i32 0, i32 0
-// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[CALL]] to i32*
-// CHECK: store i32* %[[COERCE_VAL_IP]], i32** %[[COERCE_DIVE]], align 8
-// CHECK: %[[COERCE_DIVE1:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[AGG_TMP]], i32 0, i32 0
-// CHECK: %[[V0:.*]] = load i32*, i32** %[[COERCE_DIVE1]], align 8
-// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i32* %[[V0]] to i64
+// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[AGG_TMP]], i32 0, i32 0
+// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[CALL]] to ptr
+// CHECK: store ptr %[[COERCE_VAL_IP]], ptr %[[COERCE_DIVE]], align 8
+// CHECK: %[[COERCE_DIVE1:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[AGG_TMP]], i32 0, i32 0
+// CHECK: %[[V0:.*]] = load ptr, ptr %[[COERCE_DIVE1]], align 8
+// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint ptr %[[V0]] to i64
// CHECK: call void @_Z14testParamSmall5Small(i64 %[[COERCE_VAL_PI]])
// CHECK: ret void
// CHECK: }
@@ -132,10 +132,10 @@ void testCallSmall1() {
// CHECK: define{{.*}} void @_Z16testIgnoredSmallv()
// CHECK: %[[AGG_TMP_ENSURED:.*]] = alloca %[[STRUCT_SMALL:.*]], align 8
// CHECK: %[[CALL:.*]] = call i64 @_Z15testReturnSmallv()
-// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[AGG_TMP_ENSURED]], i32 0, i32 0
-// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[CALL]] to i32*
-// CHECK: store i32* %[[COERCE_VAL_IP]], i32** %[[COERCE_DIVE]], align 8
-// CHECK: %[[CALL1:.*]] = call noundef %[[STRUCT_SMALL]]* @_ZN5SmallD1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[AGG_TMP_ENSURED]])
+// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], ptr %[[AGG_TMP_ENSURED]], i32 0, i32 0
+// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[CALL]] to ptr
+// CHECK: store ptr %[[COERCE_VAL_IP]], ptr %[[COERCE_DIVE]], align 8
+// CHECK: %[[CALL1:.*]] = call noundef ptr @_ZN5SmallD1Ev(ptr {{[^,]*}} %[[AGG_TMP_ENSURED]])
// CHECK: ret void
// CHECK: }
@@ -143,16 +143,16 @@ void testIgnoredSmall() {
testReturnSmall();
}
-// CHECK: define{{.*}} void @_Z14testParamLarge5Large(%[[STRUCT_LARGE:.*]]* noundef %[[A:.*]])
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_LARGE]]* @_ZN5LargeD1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[A]])
+// CHECK: define{{.*}} void @_Z14testParamLarge5Large(ptr noundef %[[A:.*]])
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN5LargeD1Ev(ptr {{[^,]*}} %[[A]])
// CHECK: ret void
// CHECK: }
void testParamLarge(Large a) noexcept {
}
-// CHECK: define{{.*}} void @_Z15testReturnLargev(%[[STRUCT_LARGE:.*]]* noalias sret(%[[STRUCT_LARGE]]) align 8 %[[AGG_RESULT:.*]])
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_LARGE]]* @_ZN5LargeC1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[AGG_RESULT]])
+// CHECK: define{{.*}} void @_Z15testReturnLargev(ptr noalias sret(%[[STRUCT_LARGE]]) align 8 %[[AGG_RESULT:.*]])
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN5LargeC1Ev(ptr {{[^,]*}} %[[AGG_RESULT]])
// CHECK: ret void
// CHECK: }
@@ -164,10 +164,10 @@ Large testReturnLarge() {
// CHECK: define{{.*}} void @_Z14testCallLarge0v()
// CHECK: %[[T:.*]] = alloca %[[STRUCT_LARGE:.*]], align 8
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_LARGE]], align 8
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_LARGE]]* @_ZN5LargeC1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[T]])
-// CHECK: %[[CALL1:.*]] = call noundef %[[STRUCT_LARGE]]* @_ZN5LargeC1ERKS_(%[[STRUCT_LARGE]]* {{[^,]*}} %[[AGG_TMP]], %[[STRUCT_LARGE]]* noundef nonnull align 8 dereferenceable(520) %[[T]])
-// CHECK: call void @_Z14testParamLarge5Large(%[[STRUCT_LARGE]]* noundef %[[AGG_TMP]])
-// CHECK: %[[CALL2:.*]] = call noundef %[[STRUCT_LARGE]]* @_ZN5LargeD1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[T]])
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN5LargeC1Ev(ptr {{[^,]*}} %[[T]])
+// CHECK: %[[CALL1:.*]] = call noundef ptr @_ZN5LargeC1ERKS_(ptr {{[^,]*}} %[[AGG_TMP]], ptr noundef nonnull align 8 dereferenceable(520) %[[T]])
+// CHECK: call void @_Z14testParamLarge5Large(ptr noundef %[[AGG_TMP]])
+// CHECK: %[[CALL2:.*]] = call noundef ptr @_ZN5LargeD1Ev(ptr {{[^,]*}} %[[T]])
// CHECK: ret void
// CHECK: }
@@ -178,8 +178,8 @@ void testCallLarge0() {
// CHECK: define{{.*}} void @_Z14testCallLarge1v()
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_LARGE:.*]], align 8
-// CHECK: call void @_Z15testReturnLargev(%[[STRUCT_LARGE]]* sret(%[[STRUCT_LARGE]]) align 8 %[[AGG_TMP]])
-// CHECK: call void @_Z14testParamLarge5Large(%[[STRUCT_LARGE]]* noundef %[[AGG_TMP]])
+// CHECK: call void @_Z15testReturnLargev(ptr sret(%[[STRUCT_LARGE]]) align 8 %[[AGG_TMP]])
+// CHECK: call void @_Z14testParamLarge5Large(ptr noundef %[[AGG_TMP]])
// CHECK: ret void
// CHECK: }
@@ -189,8 +189,8 @@ void testCallLarge1() {
// CHECK: define{{.*}} void @_Z16testIgnoredLargev()
// CHECK: %[[AGG_TMP_ENSURED:.*]] = alloca %[[STRUCT_LARGE:.*]], align 8
-// CHECK: call void @_Z15testReturnLargev(%[[STRUCT_LARGE]]* sret(%[[STRUCT_LARGE]]) align 8 %[[AGG_TMP_ENSURED]])
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_LARGE]]* @_ZN5LargeD1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[AGG_TMP_ENSURED]])
+// CHECK: call void @_Z15testReturnLargev(ptr sret(%[[STRUCT_LARGE]]) align 8 %[[AGG_TMP_ENSURED]])
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN5LargeD1Ev(ptr {{[^,]*}} %[[AGG_TMP_ENSURED]])
// CHECK: ret void
// CHECK: }
@@ -200,8 +200,8 @@ void testIgnoredLarge() {
// CHECK: define{{.*}} i32 @_Z20testReturnHasTrivialv()
// CHECK: %[[RETVAL:.*]] = alloca %[[STRUCT_TRIVIAL:.*]], align 4
-// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_TRIVIAL]], %[[STRUCT_TRIVIAL]]* %[[RETVAL]], i32 0, i32 0
-// CHECK: %[[V0:.*]] = load i32, i32* %[[COERCE_DIVE]], align 4
+// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_TRIVIAL]], ptr %[[RETVAL]], i32 0, i32 0
+// CHECK: %[[V0:.*]] = load i32, ptr %[[COERCE_DIVE]], align 4
// CHECK: ret i32 %[[V0]]
// CHECK: }
@@ -210,8 +210,8 @@ Trivial testReturnHasTrivial() {
return t;
}
-// CHECK: define{{.*}} void @_Z23testReturnHasNonTrivialv(%[[STRUCT_NONTRIVIAL:.*]]* noalias sret(%[[STRUCT_NONTRIVIAL]]) align 4 %[[AGG_RESULT:.*]])
-// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_NONTRIVIAL]]* @_ZN10NonTrivialC1Ev(%[[STRUCT_NONTRIVIAL]]* {{[^,]*}} %[[AGG_RESULT]])
+// CHECK: define{{.*}} void @_Z23testReturnHasNonTrivialv(ptr noalias sret(%[[STRUCT_NONTRIVIAL:.*]]) align 4 %[[AGG_RESULT:.*]])
+// CHECK: %[[CALL:.*]] = call noundef ptr @_ZN10NonTrivialC1Ev(ptr {{[^,]*}} %[[AGG_RESULT]])
// CHECK: ret void
// CHECK: }
@@ -223,17 +223,17 @@ NonTrivial testReturnHasNonTrivial() {
// CHECK: define{{.*}} void @_Z18testExceptionSmallv()
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_SMALL]], align 8
// CHECK: %[[AGG_TMP1:.*]] = alloca %[[STRUCT_SMALL]], align 8
-// CHECK: call noundef %[[STRUCT_SMALL]]* @_ZN5SmallC1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[AGG_TMP]])
-// CHECK: invoke noundef %[[STRUCT_SMALL]]* @_ZN5SmallC1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[AGG_TMP1]])
+// CHECK: call noundef ptr @_ZN5SmallC1Ev(ptr {{[^,]*}} %[[AGG_TMP]])
+// CHECK: invoke noundef ptr @_ZN5SmallC1Ev(ptr {{[^,]*}} %[[AGG_TMP1]])
// CHECK: call void @_Z20calleeExceptionSmall5SmallS_(i64 %{{.*}}, i64 %{{.*}})
// CHECK-NEXT: ret void
-// CHECK: landingpad { i8*, i32 }
-// CHECK: call noundef %[[STRUCT_SMALL]]* @_ZN5SmallD1Ev(%[[STRUCT_SMALL]]* {{[^,]*}} %[[AGG_TMP]])
+// CHECK: landingpad { ptr, i32 }
+// CHECK: call noundef ptr @_ZN5SmallD1Ev(ptr {{[^,]*}} %[[AGG_TMP]])
// CHECK: br
-// CHECK: resume { i8*, i32 }
+// CHECK: resume { ptr, i32 }
void calleeExceptionSmall(Small, Small);
@@ -244,17 +244,17 @@ void testExceptionSmall() {
// CHECK: define{{.*}} void @_Z18testExceptionLargev()
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_LARGE]], align 8
// CHECK: %[[AGG_TMP1:.*]] = alloca %[[STRUCT_LARGE]], align 8
-// CHECK: call noundef %[[STRUCT_LARGE]]* @_ZN5LargeC1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[AGG_TMP]])
-// CHECK: invoke noundef %[[STRUCT_LARGE]]* @_ZN5LargeC1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[AGG_TMP1]])
+// CHECK: call noundef ptr @_ZN5LargeC1Ev(ptr {{[^,]*}} %[[AGG_TMP]])
+// CHECK: invoke noundef ptr @_ZN5LargeC1Ev(ptr {{[^,]*}} %[[AGG_TMP1]])
-// CHECK: call void @_Z20calleeExceptionLarge5LargeS_(%[[STRUCT_LARGE]]* noundef %[[AGG_TMP]], %[[STRUCT_LARGE]]* noundef %[[AGG_TMP1]])
+// CHECK: call void @_Z20calleeExceptionLarge5LargeS_(ptr noundef %[[AGG_TMP]], ptr noundef %[[AGG_TMP1]])
// CHECK-NEXT: ret void
-// CHECK: landingpad { i8*, i32 }
-// CHECK: call noundef %[[STRUCT_LARGE]]* @_ZN5LargeD1Ev(%[[STRUCT_LARGE]]* {{[^,]*}} %[[AGG_TMP]])
+// CHECK: landingpad { ptr, i32 }
+// CHECK: call noundef ptr @_ZN5LargeD1Ev(ptr {{[^,]*}} %[[AGG_TMP]])
// CHECK: br
-// CHECK: resume { i8*, i32 }
+// CHECK: resume { ptr, i32 }
void calleeExceptionLarge(Large, Large);
@@ -270,9 +270,7 @@ void testExceptionLarge() {
// CHECK: %[[CALL:.*]] = call{{.*}} @"_ZNK3$_0clEv"
// CHECK: %[[COERCEDIVE:.*]] = getelementptr{{.*}} %[[COERCE]]
// CHECK: %[[COERCEVALIP:.*]] = inttoptr{{.*}} %[[CALL]]
-// CHECK: %[[RETVALP:.*]] = bitcast %[[STRUCT_SMALL]]* %[[RETVAL]]
-// CHECK: %[[COERCEP:.*]] = bitcast %[[STRUCT_SMALL]]* %[[COERCE]]
-// CHECK: call {{.*}}memcpy{{.*}} %[[RETVALP]]{{.*}} %[[COERCEP]]
+// CHECK: call {{.*}}memcpy{{.*}} %[[RETVAL]]{{.*}} %[[COERCE]]
// CHECK: %[[COERCEDIVE1:.*]] = getelementptr{{.*}} %[[RETVAL]]
// CHECK: %[[TMP:.*]] = load{{.*}} %[[COERCEDIVE1]]
// CHECK: %[[COERCEVALPI:.*]] = ptrtoint{{.*}} %[[TMP]]
diff --git a/clang/test/CodeGenCXX/try-catch.cpp b/clang/test/CodeGenCXX/try-catch.cpp
index 45825529d511d..5e9319c5daca4 100644
--- a/clang/test/CodeGenCXX/try-catch.cpp
+++ b/clang/test/CodeGenCXX/try-catch.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s
struct X { };
@@ -7,7 +7,7 @@ const X g();
void f() {
try {
throw g();
- // CHECK: @_ZTI1X to i8
+ // CHECK: @_ZTI1X
} catch (const X x) {
}
}
@@ -15,7 +15,7 @@ void f() {
void h() {
try {
throw "ABC";
- // CHECK: @_ZTIPKc to i8
+ // CHECK: @_ZTIPKc
} catch (char const(&)[4]) {
}
}
diff --git a/clang/test/CodeGenCXX/type-metadata.cpp b/clang/test/CodeGenCXX/type-metadata.cpp
index dbe5926725338..0a90968062d92 100644
--- a/clang/test/CodeGenCXX/type-metadata.cpp
+++ b/clang/test/CodeGenCXX/type-metadata.cpp
@@ -1,18 +1,18 @@
// Tests for the cfi-vcall feature:
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=NDIAG %s
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-DIAG --check-prefix=DIAG --check-prefix=DIAG-ABORT %s
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-recover=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-DIAG --check-prefix=DIAG --check-prefix=DIAG-RECOVER %s
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-pc-windows-msvc -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=MS --check-prefix=TT-MS --check-prefix=NDIAG %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=NDIAG %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-DIAG --check-prefix=DIAG --check-prefix=DIAG-ABORT %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-recover=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-DIAG --check-prefix=DIAG --check-prefix=DIAG-RECOVER %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-pc-windows-msvc -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=MS --check-prefix=TT-MS --check-prefix=NDIAG %s
// Tests for the whole-program-vtables feature:
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN %s
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM-DEFAULTVIS --check-prefix=TT-ITANIUM-DEFAULT %s
-// RUN: %clang_cc1 -no-opaque-pointers -O2 -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=ITANIUM-OPT %s
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-pc-windows-msvc -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=MS --check-prefix=TT-MS %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM-DEFAULTVIS --check-prefix=TT-ITANIUM-DEFAULT %s
+// RUN: %clang_cc1 -O2 -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=ITANIUM-OPT %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-pc-windows-msvc -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=MS --check-prefix=TT-MS %s
// Tests for cfi + whole-program-vtables:
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-VT --check-prefix=ITANIUM --check-prefix=TC-ITANIUM %s
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-pc-windows-msvc -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-VT --check-prefix=MS --check-prefix=TC-MS %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-VT --check-prefix=ITANIUM --check-prefix=TC-ITANIUM %s
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-pc-windows-msvc -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-VT --check-prefix=MS --check-prefix=TC-MS %s
// ITANIUM: @_ZTV1A = {{[^!]*}}, !type [[A16:![0-9]+]]
// ITANIUM-DIAG-SAME: !type [[ALL16:![0-9]+]]
@@ -38,7 +38,7 @@
// DIAG: @[[SRC:.*]] = private unnamed_addr constant [{{.*}} x i8] c"{{.*}}type-metadata.cpp\00", align 1
// DIAG: @[[TYPE:.*]] = private unnamed_addr constant { i16, i16, [4 x i8] } { i16 -1, i16 0, [4 x i8] c"'A'\00" }
-// DIAG: @[[BADTYPESTATIC:.*]] = private unnamed_addr global { i8, { [{{.*}} x i8]*, i32, i32 }, { i16, i16, [4 x i8] }* } { i8 0, { [{{.*}} x i8]*, i32, i32 } { [{{.*}} x i8]* @[[SRC]], i32 123, i32 3 }, { i16, i16, [4 x i8] }* @[[TYPE]] }
+// DIAG: @[[BADTYPESTATIC:.*]] = private unnamed_addr global { i8, { ptr, i32, i32 }, ptr } { i8 0, { ptr, i32, i32 } { ptr @[[SRC]], i32 123, i32 3 }, ptr @[[TYPE]] }
// ITANIUM: @_ZTVN12_GLOBAL__N_11DE = {{[^!]*}}, !type [[A32]]
// ITANIUM-DIAG-SAME: !type [[ALL32]]
@@ -85,7 +85,7 @@
// ITANIUM-OPT: @_ZTVN5test31EE = available_externally unnamed_addr constant {{[^!]*}},
// ITANIUM-OPT-SAME: !type [[E16:![0-9]+]],
// ITANIUM-OPT-SAME: !type [[EF16:![0-9]+]]
-// ITANIUM-OPT: @llvm.compiler.used = appending global [1 x i8*] [i8* bitcast ({ [3 x i8*] }* @_ZTVN5test31EE to i8*)]
+// ITANIUM-OPT: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZTVN5test31EE]
// MS: comdat($"??_7A@@6B@"), !type [[A8:![0-9]+]]
// MS: comdat($"??_7B@@6B0@@"), !type [[B8:![0-9]+]]
@@ -141,13 +141,13 @@ void D::h() {
// ITANIUM-DEFAULTVIS: define{{.*}} void @_Z2afP1A
// MS: define dso_local void @"?af@@YAXPEAUA@@@Z"
void af(A *a) {
- // TT-ITANIUM-HIDDEN: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* [[VT:%[^ ]*]], metadata !"_ZTS1A")
- // TT-ITANIUM-DEFAULT: [[P:%[^ ]*]] = call i1 @llvm.public.type.test(i8* [[VT:%[^ ]*]], metadata !"_ZTS1A")
- // TT-MS: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* [[VT:%[^ ]*]], metadata !"?AUA@@")
- // TC-ITANIUM: [[PAIR:%[^ ]*]] = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 0, metadata !"_ZTS1A")
- // TC-MS: [[PAIR:%[^ ]*]] = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 0, metadata !"?AUA@@")
- // CFI-VT: [[P:%[^ ]*]] = extractvalue { i8*, i1 } [[PAIR]], 1
- // DIAG-NEXT: [[VTVALID0:%[^ ]*]] = call i1 @llvm.type.test(i8* [[VT]], metadata !"all-vtables")
+ // TT-ITANIUM-HIDDEN: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr [[VT:%[^ ]*]], metadata !"_ZTS1A")
+ // TT-ITANIUM-DEFAULT: [[P:%[^ ]*]] = call i1 @llvm.public.type.test(ptr [[VT:%[^ ]*]], metadata !"_ZTS1A")
+ // TT-MS: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr [[VT:%[^ ]*]], metadata !"?AUA@@")
+ // TC-ITANIUM: [[PAIR:%[^ ]*]] = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"_ZTS1A")
+ // TC-MS: [[PAIR:%[^ ]*]] = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUA@@")
+ // CFI-VT: [[P:%[^ ]*]] = extractvalue { ptr, i1 } [[PAIR]], 1
+ // DIAG-NEXT: [[VTVALID0:%[^ ]*]] = call i1 @llvm.type.test(ptr [[VT]], metadata !"all-vtables")
// VTABLE-OPT: call void @llvm.assume(i1 [[P]])
// CFI-NEXT: br i1 [[P]], label %[[CONTBB:[^ ,]*]], label %[[TRAPBB:[^ ,]*]]
// CFI-NEXT: {{^$}}
@@ -155,18 +155,16 @@ void af(A *a) {
// CFI: [[TRAPBB]]
// NDIAG-NEXT: call void @llvm.ubsantrap(i8 2)
// NDIAG-NEXT: unreachable
- // DIAG-NEXT: [[VTINT:%[^ ]*]] = ptrtoint i8* [[VT]] to i64
+ // DIAG-NEXT: [[VTINT:%[^ ]*]] = ptrtoint ptr [[VT]] to i64
// DIAG-NEXT: [[VTVALID:%[^ ]*]] = zext i1 [[VTVALID0]] to i64
- // DIAG-ABORT-NEXT: call void @__ubsan_handle_cfi_check_fail_abort(i8* getelementptr inbounds ({{.*}} @[[BADTYPESTATIC]], i32 0, i32 0), i64 [[VTINT]], i64 [[VTVALID]])
+ // DIAG-ABORT-NEXT: call void @__ubsan_handle_cfi_check_fail_abort(ptr @[[BADTYPESTATIC]], i64 [[VTINT]], i64 [[VTVALID]])
// DIAG-ABORT-NEXT: unreachable
- // DIAG-RECOVER-NEXT: call void @__ubsan_handle_cfi_check_fail(i8* getelementptr inbounds ({{.*}} @[[BADTYPESTATIC]], i32 0, i32 0), i64 [[VTINT]], i64 [[VTVALID]])
+ // DIAG-RECOVER-NEXT: call void @__ubsan_handle_cfi_check_fail(ptr @[[BADTYPESTATIC]], i64 [[VTINT]], i64 [[VTVALID]])
// DIAG-RECOVER-NEXT: br label %[[CONTBB]]
// CFI: [[CONTBB]]
// CFI-NVT: [[PTR:%[^ ]*]] = load
- // CFI-VT: [[PTRI8:%[^ ]*]] = extractvalue { i8*, i1 } [[PAIR]], 0
- // CFI-VT: [[PTR:%[^ ]*]] = bitcast i8* [[PTRI8]] to
- // CFI: call void [[PTR]]
+ // CFI-VT: [[PTRI8:%[^ ]*]] = extractvalue { ptr, i1 } [[PAIR]], 0
#line 123
a->f();
}
@@ -174,33 +172,33 @@ void af(A *a) {
// ITANIUM: define internal void @_Z3df1PN12_GLOBAL__N_11DE
// MS: define internal void @"?df1@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
void df1(D *d) {
- // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
- // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
- // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"?AUA@@")
- // TC-ITANIUM: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 0, metadata ![[DTYPE:[0-9]+]])
- // TC-MS: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 0, metadata !"?AUA@@")
+ // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
+ // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
+ // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"?AUA@@")
+ // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata ![[DTYPE:[0-9]+]])
+ // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUA@@")
d->f();
}
// ITANIUM: define internal void @_Z3dg1PN12_GLOBAL__N_11DE
// MS: define internal void @"?dg1@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
void dg1(D *d) {
- // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
- // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.public.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
- // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"?AUB@@")
- // TC-ITANIUM: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 8, metadata !"_ZTS1B")
- // TC-MS: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 0, metadata !"?AUB@@")
+ // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
+ // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.public.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
+ // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"?AUB@@")
+ // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 8, metadata !"_ZTS1B")
+ // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUB@@")
d->g();
}
// ITANIUM: define internal void @_Z3dh1PN12_GLOBAL__N_11DE
// MS: define internal void @"?dh1@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
void dh1(D *d) {
- // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata ![[DTYPE]])
- // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata ![[DTYPE]])
- // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
- // TC-ITANIUM: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 16, metadata ![[DTYPE]])
- // TC-MS: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 8, metadata ![[DTYPE:[0-9]+]])
+ // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE]])
+ // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE]])
+ // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
+ // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 16, metadata ![[DTYPE]])
+ // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 8, metadata ![[DTYPE:[0-9]+]])
d->h();
}
@@ -256,11 +254,11 @@ struct D : C {
// ITANIUM-DEFAULTVIS: define{{.*}} void @_ZN5test21fEPNS_1DE
// MS: define dso_local void @"?f at test2@@YAXPEAUD at 1@@Z"
void f(D *d) {
- // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTSN5test21DE")
- // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.public.type.test(i8* {{%[^ ]*}}, metadata !"_ZTSN5test21DE")
- // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"?AUA at test2@@")
- // TC-ITANIUM: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 8, metadata !"_ZTSN5test21DE")
- // TC-MS: {{%[^ ]*}} = call { i8*, i1 } @llvm.type.checked.load(i8* {{%[^ ]*}}, i32 0, metadata !"?AUA at test2@@")
+ // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTSN5test21DE")
+ // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.public.type.test(ptr {{%[^ ]*}}, metadata !"_ZTSN5test21DE")
+ // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"?AUA at test2@@")
+ // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 8, metadata !"_ZTSN5test21DE")
+ // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUA at test2@@")
d->m_fn1();
}
diff --git a/clang/test/CodeGenCXX/typeid-cxx11.cpp b/clang/test/CodeGenCXX/typeid-cxx11.cpp
index 05c6c1b17521f..68563adeee4a5 100644
--- a/clang/test/CodeGenCXX/typeid-cxx11.cpp
+++ b/clang/test/CodeGenCXX/typeid-cxx11.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -o - | FileCheck %s
#include <typeinfo>
namespace Test1 {
@@ -18,15 +18,15 @@ struct A { virtual ~A(); };
struct B : virtual A {};
struct C { int n; };
-// CHECK: @_ZN5Test15itemsE ={{.*}} constant [4 x {{.*}}] [{{.*}} @_ZTIN5Test11AE {{.*}}, {{.*}}, {{.*}} @_ZN5Test19make_implINS_1AEEEPvv }, {{.*}} @_ZTIN5Test11BE {{.*}} @_ZN5Test19make_implINS_1BEEEPvv {{.*}} @_ZTIN5Test11CE {{.*}} @_ZN5Test19make_implINS_1CEEEPvv {{.*}} @_ZTIi {{.*}} @_ZN5Test19make_implIiEEPvv }]
+// CHECK: @_ZN5Test15itemsE ={{.*}} constant [4 x {{.*}}] [{{.*}} @_ZTIN5Test11AE, {{.*}} @_ZN5Test19make_implINS_1AEEEPvv {{.*}} @_ZTIN5Test11BE, {{.*}} @_ZN5Test19make_implINS_1BEEEPvv {{.*}} @_ZTIN5Test11CE, {{.*}} @_ZN5Test19make_implINS_1CEEEPvv {{.*}} @_ZTIi, {{.*}} @_ZN5Test19make_implIiEEPvv }]
extern constexpr Item items[] = {
item<A>("A"), item<B>("B"), item<C>("C"), item<int>("int")
};
-// CHECK: @_ZN5Test11xE ={{.*}} constant %"class.std::type_info"* bitcast ({{.*}}* @_ZTIN5Test11AE to %"class.std::type_info"*), align 8
+// CHECK: @_ZN5Test11xE ={{.*}} constant ptr @_ZTIN5Test11AE, align 8
constexpr auto &x = items[0].ti;
-// CHECK: @_ZN5Test11yE ={{.*}} constant %"class.std::type_info"* bitcast ({{.*}}* @_ZTIN5Test11BE to %"class.std::type_info"*), align 8
+// CHECK: @_ZN5Test11yE ={{.*}} constant ptr @_ZTIN5Test11BE, align 8
constexpr auto &y = typeid(B{});
}
diff --git a/clang/test/CodeGenCXX/ubsan-devirtualized-calls.cpp b/clang/test/CodeGenCXX/ubsan-devirtualized-calls.cpp
index e97333f3825a4..8a4dc0427b7b8 100644
--- a/clang/test/CodeGenCXX/ubsan-devirtualized-calls.cpp
+++ b/clang/test/CodeGenCXX/ubsan-devirtualized-calls.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple %itanium_abi_triple -emit-llvm -fsanitize=null,vptr %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -fsanitize=null,vptr %s -o - | FileCheck %s
struct Base1 {
virtual void f1() {}
@@ -24,44 +24,44 @@ struct Derived4 final : Base1 {
void f1() override final {}
};
-// CHECK: [[UBSAN_TI_DERIVED1_1:@[0-9]+]] = private unnamed_addr global {{.*}} i8* bitcast {{.*}} @_ZTI8Derived1 to i8*
-// CHECK: [[UBSAN_TI_DERIVED2_1:@[0-9]+]] = private unnamed_addr global {{.*}} i8* bitcast {{.*}} @_ZTI8Derived2 to i8*
-// CHECK: [[UBSAN_TI_DERIVED2_2:@[0-9]+]] = private unnamed_addr global {{.*}} i8* bitcast {{.*}} @_ZTI8Derived2 to i8*
-// CHECK: [[UBSAN_TI_DERIVED3:@[0-9]+]] = private unnamed_addr global {{.*}} i8* bitcast {{.*}} @_ZTI8Derived3 to i8*
-// CHECK: [[UBSAN_TI_BASE1:@[0-9]+]] = private unnamed_addr global {{.*}} i8* bitcast {{.*}} @_ZTI5Base1 to i8*
-// CHECK: [[UBSAN_TI_DERIVED4_1:@[0-9]+]] = private unnamed_addr global {{.*}} i8* bitcast {{.*}} @_ZTI8Derived4 to i8*
-// CHECK: [[UBSAN_TI_DERIVED4_2:@[0-9]+]] = private unnamed_addr global {{.*}} i8* bitcast {{.*}} @_ZTI8Derived4 to i8*
+// CHECK: [[UBSAN_TI_DERIVED1_1:@[0-9]+]] = private unnamed_addr global {{.*}} ptr @_ZTI8Derived1
+// CHECK: [[UBSAN_TI_DERIVED2_1:@[0-9]+]] = private unnamed_addr global {{.*}} ptr @_ZTI8Derived2
+// CHECK: [[UBSAN_TI_DERIVED2_2:@[0-9]+]] = private unnamed_addr global {{.*}} ptr @_ZTI8Derived2
+// CHECK: [[UBSAN_TI_DERIVED3:@[0-9]+]] = private unnamed_addr global {{.*}} ptr @_ZTI8Derived3
+// CHECK: [[UBSAN_TI_BASE1:@[0-9]+]] = private unnamed_addr global {{.*}} ptr @_ZTI5Base1
+// CHECK: [[UBSAN_TI_DERIVED4_1:@[0-9]+]] = private unnamed_addr global {{.*}} ptr @_ZTI8Derived4
+// CHECK: [[UBSAN_TI_DERIVED4_2:@[0-9]+]] = private unnamed_addr global {{.*}} ptr @_ZTI8Derived4
// CHECK-LABEL: define {{(dso_local )?}}void @_Z2t1v
void t1() {
Derived1 d1;
static_cast<Base1 *>(&d1)->f1(); //< Devirt Base1::f1 to Derived1::f1.
- // CHECK: %[[D1:[0-9]+]] = ptrtoint %struct.Derived1* %d1 to i{{[0-9]+}}, !nosanitize
- // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED1_1]] {{.*}}, i{{[0-9]+}} %[[D1]]
+ // CHECK: %[[D1:[0-9]+]] = ptrtoint ptr %d1 to i{{[0-9]+}}, !nosanitize
+ // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED1_1]], i{{[0-9]+}} %[[D1]]
}
// CHECK-LABEL: define {{(dso_local )?}}void @_Z2t2v
void t2() {
Derived2 d2;
static_cast<Base1 *>(&d2)->f1(); //< Devirt Base1::f1 to Derived2::f1.
- // CHECK: %[[D2_1:[0-9]+]] = ptrtoint %struct.Derived2* %d2 to i{{[0-9]+}}, !nosanitize
- // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED2_1]] {{.*}}, i{{[0-9]+}} %[[D2_1]]
+ // CHECK: %[[D2_1:[0-9]+]] = ptrtoint ptr %d2 to i{{[0-9]+}}, !nosanitize
+ // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED2_1]], i{{[0-9]+}} %[[D2_1]]
}
// CHECK-LABEL: define {{(dso_local )?}}void @_Z2t3v
void t3() {
Derived2 d2;
static_cast<Base2 *>(&d2)->f1(); //< Devirt Base2::f1 to Derived2::f1.
- // CHECK: %[[D2_2:[0-9]+]] = ptrtoint %struct.Derived2* %d2 to i{{[0-9]+}}, !nosanitize
- // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED2_2]] {{.*}}, i{{[0-9]+}} %[[D2_2]]
+ // CHECK: %[[D2_2:[0-9]+]] = ptrtoint ptr %d2 to i{{[0-9]+}}, !nosanitize
+ // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED2_2]], i{{[0-9]+}} %[[D2_2]]
}
// CHECK-LABEL: define {{(dso_local )?}}void @_Z2t4v
void t4() {
Base1 p;
Derived3 *badp = static_cast<Derived3 *>(&p); //< Check that &p isa Derived3.
- // CHECK: %[[P1:[0-9]+]] = ptrtoint %struct.Derived3* {{%[0-9]+}} to i{{[0-9]+}}, !nosanitize
- // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED3]] {{.*}}, i{{[0-9]+}} %[[P1]]
+ // CHECK: %[[P1:[0-9]+]] = ptrtoint ptr %p to i{{[0-9]+}}, !nosanitize
+ // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED3]], i{{[0-9]+}} %[[P1]]
static_cast<Base1 *>(badp)->f1(); //< No devirt, test 'badp isa Base1'.
// We were able to skip the null check on the first type check because 'p'
@@ -69,20 +69,20 @@ void t4() {
// is a (bitcast (load ...)).
// CHECK: call void @__ubsan_handle_type_mismatch
//
- // CHECK: %[[BADP1:[0-9]+]] = ptrtoint %struct.Base1* {{%[0-9]+}} to i{{[0-9]+}}, !nosanitize
- // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_BASE1]] {{.*}}, i{{[0-9]+}} %[[BADP1]]
+ // CHECK: %[[BADP1:[0-9]+]] = ptrtoint ptr {{%[0-9]+}} to i{{[0-9]+}}, !nosanitize
+ // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_BASE1]], i{{[0-9]+}} %[[BADP1]]
}
// CHECK-LABEL: define {{(dso_local )?}}void @_Z2t5v
void t5() {
Base1 p;
Derived4 *badp = static_cast<Derived4 *>(&p); //< Check that &p isa Derived4.
- // CHECK: %[[P1:[0-9]+]] = ptrtoint %struct.Derived4* {{%[0-9]+}} to i{{[0-9]+}}, !nosanitize
- // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED4_1]] {{.*}}, i{{[0-9]+}} %[[P1]]
+ // CHECK: %[[P1:[0-9]+]] = ptrtoint ptr %p to i{{[0-9]+}}, !nosanitize
+ // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED4_1]], i{{[0-9]+}} %[[P1]]
static_cast<Base1 *>(badp)->f1(); //< Devirt Base1::f1 to Derived4::f1.
// CHECK: call void @__ubsan_handle_type_mismatch
//
- // CHECK: %[[BADP1:[0-9]+]] = ptrtoint %struct.Derived4* {{%[0-9]+}} to i{{[0-9]+}}, !nosanitize
- // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED4_2]] {{.*}}, i{{[0-9]+}} %[[BADP1]]
+ // CHECK: %[[BADP1:[0-9]+]] = ptrtoint ptr {{%[0-9]+}} to i{{[0-9]+}}, !nosanitize
+ // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED4_2]], i{{[0-9]+}} %[[BADP1]]
}
diff --git a/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp b/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp
index ce97c10cf4f86..c70316214cf66 100644
--- a/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp
+++ b/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-linux -emit-llvm -fsanitize=null %s -o - | FileCheck %s --check-prefix=CHECK-NULL --check-prefix=ITANIUM
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows -emit-llvm -fsanitize=null %s -o - | FileCheck %s --check-prefix=CHECK-NULL --check-prefix=MSABI
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-linux -emit-llvm -fsanitize=null,vptr %s -o - | FileCheck %s --check-prefix=CHECK-VPTR --check-prefix=ITANIUM
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows -emit-llvm -fsanitize=null,vptr %s -o - | FileCheck %s --check-prefix=CHECK-VPTR --check-prefix=MSABI --check-prefix=CHECK-VPTR-MS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux -emit-llvm -fsanitize=null %s -o - | FileCheck %s --check-prefix=CHECK-NULL --check-prefix=ITANIUM
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows -emit-llvm -fsanitize=null %s -o - | FileCheck %s --check-prefix=CHECK-NULL --check-prefix=MSABI
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux -emit-llvm -fsanitize=null,vptr %s -o - | FileCheck %s --check-prefix=CHECK-VPTR --check-prefix=ITANIUM
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows -emit-llvm -fsanitize=null,vptr %s -o - | FileCheck %s --check-prefix=CHECK-VPTR --check-prefix=MSABI --check-prefix=CHECK-VPTR-MS
struct T {
virtual ~T() {}
virtual int v() { return 1; }
@@ -20,12 +20,12 @@ U::~U() {}
// MSABI: define dso_local noundef i32 @"?get_v
int get_v(T* t) {
// First, we check that vtable is not loaded before a type check.
- // CHECK-NULL-NOT: load {{.*}} (%struct.T*{{.*}})**, {{.*}} (%struct.T*{{.*}})***
- // CHECK-NULL: [[UBSAN_CMP_RES:%[0-9]+]] = icmp ne %struct.T* %{{[_a-z0-9]+}}, null
+ // CHECK-NULL-NOT: load {{.*}} (ptr{{.*}})**, {{.*}} (ptr{{.*}})***
+ // CHECK-NULL: [[UBSAN_CMP_RES:%[0-9]+]] = icmp ne ptr %{{[_a-z0-9]+}}, null
// CHECK-NULL-NEXT: br i1 [[UBSAN_CMP_RES]], label %{{.*}}, label %{{.*}}
// CHECK-NULL: call void @__ubsan_handle_type_mismatch_v1_abort
// Second, we check that vtable is actually loaded once the type check is done.
- // CHECK-NULL: load {{.*}} (%struct.T*{{.*}})**, {{.*}} (%struct.T*{{.*}})***
+ // CHECK-NULL: load ptr, ptr {{.*}}
return t->v();
}
@@ -33,22 +33,22 @@ int get_v(T* t) {
// MSABI: define dso_local void @"?delete_it
void delete_it(T *t) {
// First, we check that vtable is not loaded before a type check.
- // CHECK-VPTR-NOT: load {{.*}} (%struct.T*{{.*}})**, {{.*}} (%struct.T*{{.*}})***
+ // CHECK-VPTR-NOT: load {{.*}} (ptr{{.*}})**, {{.*}} (ptr{{.*}})***
// CHECK-VPTR: br i1 {{.*}} label %{{.*}}
// CHECK-VPTR: call void @__ubsan_handle_dynamic_type_cache_miss_abort
// Second, we check that vtable is actually loaded once the type check is done.
- // CHECK-VPTR: load {{.*}} (%struct.T*{{.*}})**, {{.*}} (%struct.T*{{.*}})***
+ // CHECK-VPTR: load ptr, ptr {{.*}}
delete t;
}
-// ITANIUM: define{{.*}} %struct.U* @_Z7dyncastP1T
-// MSABI: define dso_local noundef %struct.U* @"?dyncast
+// ITANIUM: define{{.*}} ptr @_Z7dyncastP1T
+// MSABI: define dso_local noundef ptr @"?dyncast
U* dyncast(T *t) {
// First, we check that dynamic_cast is not called before a type check.
- // CHECK-VPTR-NOT: call i8* @__{{dynamic_cast|RTDynamicCast}}
+ // CHECK-VPTR-NOT: call ptr @__{{dynamic_cast|RTDynamicCast}}
// CHECK-VPTR: br i1 {{.*}} label %{{.*}}
// CHECK-VPTR: call void @__ubsan_handle_dynamic_type_cache_miss_abort
// Second, we check that dynamic_cast is actually called once the type check is done.
- // CHECK-VPTR: call i8* @__{{dynamic_cast|RTDynamicCast}}
+ // CHECK-VPTR: call ptr @__{{dynamic_cast|RTDynamicCast}}
return dynamic_cast<U*>(t);
}
diff --git a/clang/test/CodeGenCXX/value-init.cpp b/clang/test/CodeGenCXX/value-init.cpp
index f517aeff40821..1430076557e4f 100644
--- a/clang/test/CodeGenCXX/value-init.cpp
+++ b/clang/test/CodeGenCXX/value-init.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX98
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX17
+// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX98
+// RUN: %clang_cc1 -std=c++17 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX17
struct A {
virtual ~A();
@@ -19,7 +19,7 @@ void test_value_init() {
// PR5800
// CHECK: store i32 17
- // CHECK: call void @llvm.memset.p0i8.i64
+ // CHECK: call void @llvm.memset.p0.i64
// CHECK: call void @_ZN1BC1Ev
C c = { 17 } ;
// CHECK: call void @_ZN1CD1Ev
@@ -44,7 +44,6 @@ struct enum_holder_and_int
// CHECK: _Z24test_enum_holder_and_intv()
void test_enum_holder_and_int() {
// CHECK: alloca
- // CHECK-NEXT: bitcast
// CHECK-NEXT: call void @llvm.memset
// CHECK-NEXT: call void @_ZN19enum_holder_and_intC1Ev
enum_holder_and_int();
@@ -77,7 +76,7 @@ namespace ptrmem {
// CHECK-LABEL: define{{.*}} i32 @_ZN6ptrmem4testEPNS_1SE
int test(S *s) {
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+ // CHECK: call void @llvm.memcpy.p0.p0.i64
// CHECK: getelementptr
// CHECK: ret
return s->*S().mem2;
@@ -102,29 +101,29 @@ struct Test3 : public Test { };
// CHECK-LABEL: define{{.*}} void @_ZN6PR98011fEv
void f() {
- // CHECK-NOT: call void @llvm.memset.p0i8.i64
+ // CHECK-NOT: call void @llvm.memset.p0.i64
// CHECK: call void @_ZN6PR98014TestC1Ei
- // CHECK-NOT: call void @llvm.memset.p0i8.i64
+ // CHECK-NOT: call void @llvm.memset.p0.i64
// CHECK: call void @_ZN6PR98014TestC1Ev
Test partial[3] = { 1 };
- // CHECK-NOT: call void @llvm.memset.p0i8.i64
+ // CHECK-NOT: call void @llvm.memset.p0.i64
// CHECK: call void @_ZN6PR98014TestC1Ev
// CHECK-NOT: call void @_ZN6PR98014TestC1Ev
Test empty[3] = {};
- // CHECK: call void @llvm.memset.p0i8.i64
- // CHECK-NOT: call void @llvm.memset.p0i8.i64
+ // CHECK: call void @llvm.memset.p0.i64
+ // CHECK-NOT: call void @llvm.memset.p0.i64
// CHECK-CXX98: call void @_ZN6PR98015Test2C1Ev
// CHECK-CXX17: call void @_ZN6PR98014TestC1Ev
// CHECK-NOT: call void @_ZN6PR98015Test2C1Ev
Test2 empty2[3] = {};
- // CHECK: call void @llvm.memset.p0i8.i64
- // CHECK-NOT: call void @llvm.memset.p0i8.i64
+ // CHECK: call void @llvm.memset.p0.i64
+ // CHECK-NOT: call void @llvm.memset.p0.i64
// CHECK-CXX98: call void @_ZN6PR98015Test3C1Ev
// CHECK-CXX17: call void @_ZN6PR98014TestC2Ev
- // CHECK-NOT: call void @llvm.memset.p0i8.i64
+ // CHECK-NOT: call void @llvm.memset.p0.i64
// CHECK-NOT: call void @_ZN6PR98015Test3C1Ev
Test3 empty3[3] = {};
}
@@ -136,7 +135,7 @@ namespace zeroinit {
// CHECK-LABEL: define{{.*}} i32 @_ZN8zeroinit4testEv()
int test() {
- // CHECK: call void @llvm.memset.p0i8.i64
+ // CHECK: call void @llvm.memset.p0.i64
// CHECK: ret i32 0
return S().i;
}
@@ -153,7 +152,7 @@ namespace zeroinit {
// CHECK-LABEL: define{{.*}} void @_ZN8zeroinit9testX0_X1Ev
void testX0_X1() {
- // CHECK: call void @llvm.memset.p0i8.i64
+ // CHECK: call void @llvm.memset.p0.i64
// CHECK-NEXT: call void @_ZN8zeroinit2X1C1Ev
// CHECK-NEXT: call void @_ZN8zeroinit2X11fEv
X1().f();
@@ -207,35 +206,35 @@ namespace test6 {
// CHECK-LABEL: define{{.*}} void @_ZN5test64testEv()
// CHECK: [[ARR:%.*]] = alloca [10 x [20 x [[A:%.*]]]],
- // CHECK-NEXT: [[INNER:%.*]] = getelementptr inbounds [10 x [20 x [[A]]]], [10 x [20 x [[A]]]]* [[ARR]], i64 0, i64 0
- // CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [20 x [[A]]], [20 x [[A]]]* [[INNER]], i64 0, i64 0
- // CHECK-NEXT: call void @_ZN5test61AC1Ei([[A]]* {{[^,]*}} [[T0]], i32 noundef 5)
- // CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [[A]], [[A]]* [[T0]], i64 1
- // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[T0]], i64 20
+ // CHECK-NEXT: [[INNER:%.*]] = getelementptr inbounds [10 x [20 x [[A]]]], ptr [[ARR]], i64 0, i64 0
+ // CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [20 x [[A]]], ptr [[INNER]], i64 0, i64 0
+ // CHECK-NEXT: call void @_ZN5test61AC1Ei(ptr {{[^,]*}} [[T0]], i32 noundef 5)
+ // CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [[A]], ptr [[T0]], i64 1
+ // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], ptr [[T0]], i64 20
// CHECK-NEXT: br label
- // CHECK: [[CUR:%.*]] = phi [[A]]* [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
- // CHECK-NEXT: call void @_ZN5test61AC1Ev([[A]]* {{[^,]*}} [[CUR]])
- // CHECK-NEXT: [[NEXT]] = getelementptr inbounds [[A]], [[A]]* [[CUR]], i64 1
- // CHECK-NEXT: [[T0:%.*]] = icmp eq [[A]]* [[NEXT]], [[END]]
+ // CHECK: [[CUR:%.*]] = phi ptr [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
+ // CHECK-NEXT: call void @_ZN5test61AC1Ev(ptr {{[^,]*}} [[CUR]])
+ // CHECK-NEXT: [[NEXT]] = getelementptr inbounds [[A]], ptr [[CUR]], i64 1
+ // CHECK-NEXT: [[T0:%.*]] = icmp eq ptr [[NEXT]], [[END]]
// CHECK-NEXT: br i1
- // CHECK: [[BEGIN:%.*]] = getelementptr inbounds [20 x [[A]]], [20 x [[A]]]* [[INNER]], i64 1
- // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [20 x [[A]]], [20 x [[A]]]* [[INNER]], i64 10
+ // CHECK: [[BEGIN:%.*]] = getelementptr inbounds [20 x [[A]]], ptr [[INNER]], i64 1
+ // CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [20 x [[A]]], ptr [[INNER]], i64 10
// CHECK-NEXT: br label
- // CHECK: [[CUR:%.*]] = phi [20 x [[A]]]* [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
+ // CHECK: [[CUR:%.*]] = phi ptr [ [[BEGIN]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
// Inner loop.
- // CHECK-NEXT: [[IBEGIN:%.*]] = getelementptr inbounds [20 x [[A]]], [20 x [[A]]]* [[CUR]], i{{32|64}} 0, i{{32|64}} 0
- // CHECK-NEXT: [[IEND:%.*]] = getelementptr inbounds [[A]], [[A]]* [[IBEGIN]], i64 20
+ // CHECK-NEXT: [[IBEGIN:%.*]] = getelementptr inbounds [20 x [[A]]], ptr [[CUR]], i{{32|64}} 0, i{{32|64}} 0
+ // CHECK-NEXT: [[IEND:%.*]] = getelementptr inbounds [[A]], ptr [[IBEGIN]], i64 20
// CHECK-NEXT: br label
- // CHECK: [[ICUR:%.*]] = phi [[A]]* [ [[IBEGIN]], {{%.*}} ], [ [[INEXT:%.*]], {{%.*}} ]
- // CHECK-NEXT: call void @_ZN5test61AC1Ev([[A]]* {{[^,]*}} [[ICUR]])
- // CHECK-NEXT: [[INEXT:%.*]] = getelementptr inbounds [[A]], [[A]]* [[ICUR]], i64 1
- // CHECK-NEXT: [[T0:%.*]] = icmp eq [[A]]* [[INEXT]], [[IEND]]
+ // CHECK: [[ICUR:%.*]] = phi ptr [ [[IBEGIN]], {{%.*}} ], [ [[INEXT:%.*]], {{%.*}} ]
+ // CHECK-NEXT: call void @_ZN5test61AC1Ev(ptr {{[^,]*}} [[ICUR]])
+ // CHECK-NEXT: [[INEXT:%.*]] = getelementptr inbounds [[A]], ptr [[ICUR]], i64 1
+ // CHECK-NEXT: [[T0:%.*]] = icmp eq ptr [[INEXT]], [[IEND]]
// CHECK-NEXT: br i1 [[T0]],
- // CHECK: [[NEXT]] = getelementptr inbounds [20 x [[A]]], [20 x [[A]]]* [[CUR]], i64 1
- // CHECK-NEXT: [[T0:%.*]] = icmp eq [20 x [[A]]]* [[NEXT]], [[END]]
+ // CHECK: [[NEXT]] = getelementptr inbounds [20 x [[A]]], ptr [[CUR]], i64 1
+ // CHECK-NEXT: [[T0:%.*]] = icmp eq ptr [[NEXT]], [[END]]
// CHECK-NEXT: br i1 [[T0]]
// CHECK: ret void
}
@@ -247,7 +246,7 @@ namespace PR11124 {
struct C : B { C(); };
C::C() : A(3), B() {}
// CHECK-LABEL: define{{.*}} void @_ZN7PR111241CC1Ev
- // CHECK: call void @llvm.memset.p0i8.i64(i8* align 8 {{.*}}, i8 0, i64 12, i1 false)
+ // CHECK: call void @llvm.memset.p0.i64(ptr align 8 {{.*}}, i8 0, i64 12, i1 false)
// CHECK-NEXT: call void @_ZN7PR111241BC2Ev
// Make sure C::C doesn't overwrite parts of A while it is zero-initializing B
@@ -255,7 +254,7 @@ namespace PR11124 {
struct C2 : B2 { C2(); };
C2::C2() : A(3), B2() {}
// CHECK-LABEL: define{{.*}} void @_ZN7PR111242C2C1Ev
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %{{.*}}, i8* align 8 {{.*}}, i64 16, i1 false)
+ // CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %{{.*}}, ptr align 8 {{.*}}, i64 16, i1 false)
// CHECK-NEXT: call void @_ZN7PR111242B2C2Ev
}
@@ -326,8 +325,8 @@ int explicitly_defaulted() {
return a.n;
} // CHECK-LABEL: }
-// CHECK-LABEL: define linkonce_odr void @_ZN8zeroinit2X3IiEC2Ev(%"struct.zeroinit::X3"* {{[^,]*}} %this) unnamed_addr
-// CHECK: call void @llvm.memset.p0i8.i64
+// CHECK-LABEL: define linkonce_odr void @_ZN8zeroinit2X3IiEC2Ev(ptr {{[^,]*}} %this) unnamed_addr
+// CHECK: call void @llvm.memset.p0.i64
// CHECK-NEXT: call void @_ZN8zeroinit2X2IiEC2Ev
// CHECK-NEXT: ret void
diff --git a/clang/test/CodeGenCXX/vcall-visibility-metadata.cpp b/clang/test/CodeGenCXX/vcall-visibility-metadata.cpp
index fc346df6380dc..1ad09ad0039a2 100644
--- a/clang/test/CodeGenCXX/vcall-visibility-metadata.cpp
+++ b/clang/test/CodeGenCXX/vcall-visibility-metadata.cpp
@@ -1,15 +1,15 @@
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -emit-llvm -fvirtual-function-elimination -fwhole-program-vtables -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-VFE
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-unknown-linux -emit-llvm -fwhole-program-vtables -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOVFE
-// RUN: %clang_cc1 -no-opaque-pointers -flto -flto-unit -triple x86_64-pc-windows-msvc -emit-llvm -fwhole-program-vtables -o - %s | FileCheck %s --check-prefix=CHECK-MS --check-prefix=CHECK-NOVFE
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -emit-llvm -fvirtual-function-elimination -fwhole-program-vtables -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-VFE
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -emit-llvm -fwhole-program-vtables -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOVFE
+// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-pc-windows-msvc -emit-llvm -fwhole-program-vtables -o - %s | FileCheck %s --check-prefix=CHECK-MS --check-prefix=CHECK-NOVFE
// Check that in ThinLTO we also get vcall_visibility summary entries in the bitcode
-// RUN: %clang_cc1 -no-opaque-pointers -flto=thin -flto-unit -triple x86_64-unknown-linux -emit-llvm-bc -fwhole-program-vtables -o - %s | llvm-dis -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOVFE --check-prefix=CHECK-SUMMARY
+// RUN: %clang_cc1 -flto=thin -flto-unit -triple x86_64-unknown-linux -emit-llvm-bc -fwhole-program-vtables -o - %s | llvm-dis -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOVFE --check-prefix=CHECK-SUMMARY
// Anonymous namespace.
namespace {
// CHECK: @_ZTVN12_GLOBAL__N_11AE = {{.*}} !vcall_visibility [[VIS_TU:![0-9]+]]
-// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}struct.(anonymous namespace)::A{{.*}} !vcall_visibility [[VIS_TU:![0-9]+]]
+// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}@"??_R4A@?A{{.*}}@@6B@"{{.*}} !vcall_visibility [[VIS_TU:![0-9]+]]
struct A {
A() {}
virtual int f() { return 1; }
@@ -22,7 +22,7 @@ void *construct_A() {
// Hidden visibility.
// CHECK: @_ZTV1B = {{.*}} !vcall_visibility [[VIS_DSO:![0-9]+]]
-// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}struct.B{{.*}} !vcall_visibility [[VIS_DSO:![0-9]+]]
+// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}@"??_R4B@@6B@"{{.*}} !vcall_visibility [[VIS_DSO:![0-9]+]]
struct __attribute__((visibility("hidden"))) B {
B() {}
virtual int f() { return 1; }
@@ -35,7 +35,7 @@ B *construct_B() {
// Default visibility.
// CHECK-NOT: @_ZTV1C = {{.*}} !vcall_visibility
// On MS default is hidden
-// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}struct.C{{.*}} !vcall_visibility [[VIS_DSO]]
+// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}@"??_R4C@@6B@"{{.*}} !vcall_visibility [[VIS_DSO]]
struct __attribute__((visibility("default"))) C {
C() {}
virtual int f() { return 1; }
@@ -47,7 +47,7 @@ C *construct_C() {
// Hidden visibility, public LTO visibility.
// CHECK-NOT: @_ZTV1D = {{.*}} !vcall_visibility
-// CHECK-MS-NOT: @anon.{{.*}} = private unnamed_addr constant {{.*}}struct.D{{.*}} !vcall_visibility
+// CHECK-MS-NOT: @anon.{{.*}} = private unnamed_addr constant {{.*}}@"??_R4D@@6B@"{{.*}} !vcall_visibility
struct __attribute__((visibility("hidden"))) [[clang::lto_visibility_public]] D {
D() {}
virtual int f() { return 1; }
@@ -60,7 +60,7 @@ D *construct_D() {
// Hidden visibility, but inherits from class with default visibility.
// CHECK-NOT: @_ZTV1E = {{.*}} !vcall_visibility
// On MS default is hidden
-// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}struct.E{{.*}} !vcall_visibility [[VIS_DSO]]
+// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}@"??_R4E@@6B@"{{.*}} !vcall_visibility [[VIS_DSO]]
struct __attribute__((visibility("hidden"))) E : C {
E() {}
virtual int f() { return 1; }
@@ -73,7 +73,7 @@ E *construct_E() {
// Anonymous namespace, but inherits from class with default visibility.
// CHECK-NOT: @_ZTVN12_GLOBAL__N_11FE = {{.*}} !vcall_visibility
// On MS default is hidden
-// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}struct.(anonymous namespace)::F{{.*}} !vcall_visibility [[VIS_DSO]]
+// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}@"??_R4F@?A{{.*}}@@6B@"{{.*}} !vcall_visibility [[VIS_DSO]]
namespace {
struct __attribute__((visibility("hidden"))) F : C {
F() {}
@@ -87,7 +87,7 @@ void *construct_F() {
// Anonymous namespace, but inherits from class with hidden visibility.
// CHECK: @_ZTVN12_GLOBAL__N_11GE = {{.*}} !vcall_visibility [[VIS_DSO:![0-9]+]]
-// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}struct.(anonymous namespace)::G{{.*}} !vcall_visibility [[VIS_DSO]]
+// CHECK-MS: @anon.{{.*}} = private unnamed_addr constant {{.*}}@"??_R4G@?A{{.*}}@@6B@"{{.*}} !vcall_visibility [[VIS_DSO]]
namespace {
struct __attribute__((visibility("hidden"))) G : B {
G() {}
diff --git a/clang/test/CodeGenCXX/virtual-bases.cpp b/clang/test/CodeGenCXX/virtual-bases.cpp
index 33ec1d1cdf789..83374f08c69e1 100644
--- a/clang/test/CodeGenCXX/virtual-bases.cpp
+++ b/clang/test/CodeGenCXX/virtual-bases.cpp
@@ -1,27 +1,27 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases | FileCheck %s
struct A {
A();
};
// CHECK: @_ZN1AC1Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN1AC2Ev
-// CHECK-LABEL: define{{.*}} void @_ZN1AC2Ev(%struct.A* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1AC2Ev(ptr {{[^,]*}} %this) unnamed_addr
A::A() { }
struct B : virtual A {
B();
};
-// CHECK-LABEL: define{{.*}} void @_ZN1BC2Ev(%struct.B* {{[^,]*}} %this, i8** noundef %vtt) unnamed_addr
-// CHECK-LABEL: define{{.*}} void @_ZN1BC1Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1BC2Ev(ptr {{[^,]*}} %this, ptr noundef %vtt) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1BC1Ev(ptr {{[^,]*}} %this) unnamed_addr
B::B() { }
struct C : virtual A {
C(bool);
};
-// CHECK-LABEL: define{{.*}} void @_ZN1CC2Eb(%struct.C* {{[^,]*}} %this, i8** noundef %vtt, i1 noundef zeroext %0) unnamed_addr
-// CHECK-LABEL: define{{.*}} void @_ZN1CC1Eb(%struct.C* {{[^,]*}} %this, i1 noundef zeroext %0) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1CC2Eb(ptr {{[^,]*}} %this, ptr noundef %vtt, i1 noundef zeroext %0) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1CC1Eb(ptr {{[^,]*}} %this, i1 noundef zeroext %0) unnamed_addr
C::C(bool) { }
// PR6251
@@ -39,7 +39,7 @@ struct D : B, C {
D();
};
-// CHECK-LABEL: define{{.*}} void @_ZN6PR62511DC1Ev(%"struct.PR6251::D"* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN6PR62511DC1Ev(ptr {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN6PR62511AIcEC2Ev
// CHECK-NOT: call void @_ZN6PR62511AIcEC2Ev
// CHECK: ret void
@@ -51,19 +51,19 @@ namespace virtualBaseAlignment {
// Check that the store to B::x in the base constructor has an 8-byte alignment.
-// CHECK: define linkonce_odr void @_ZN20virtualBaseAlignment1BC1Ev(%[[STRUCT_B:.*]]* {{[^,]*}} %[[THIS:.*]])
-// CHECK: %[[THIS_ADDR:.*]] = alloca %[[STRUCT_B]]*, align 8
-// CHECK: store %[[STRUCT_B]]* %[[THIS]], %[[STRUCT_B]]** %[[THIS_ADDR]], align 8
-// CHECK: %[[THIS1:.*]] = load %[[STRUCT_B]]*, %[[STRUCT_B]]** %[[THIS_ADDR]], align 8
-// CHECK: %[[X:.*]] = getelementptr inbounds %[[STRUCT_B]], %[[STRUCT_B]]* %[[THIS1]], i32 0, i32 2
-// CHECK: store i32 123, i32* %[[X]], align 16
-
-// CHECK: define linkonce_odr void @_ZN20virtualBaseAlignment1BC2Ev(%[[STRUCT_B]]* {{[^,]*}} %[[THIS:.*]], i8** noundef %{{.*}})
-// CHECK: %[[THIS_ADDR:.*]] = alloca %[[STRUCT_B]]*, align 8
-// CHECK: store %[[STRUCT_B]]* %[[THIS]], %[[STRUCT_B]]** %[[THIS_ADDR]], align 8
-// CHECK: %[[THIS1:.*]] = load %[[STRUCT_B]]*, %[[STRUCT_B]]** %[[THIS_ADDR]], align 8
-// CHECK: %[[X:.*]] = getelementptr inbounds %[[STRUCT_B]], %[[STRUCT_B]]* %[[THIS1]], i32 0, i32 2
-// CHECK: store i32 123, i32* %[[X]], align 8
+// CHECK: define linkonce_odr void @_ZN20virtualBaseAlignment1BC1Ev(ptr {{[^,]*}} %[[THIS:.*]])
+// CHECK: %[[THIS_ADDR:.*]] = alloca ptr, align 8
+// CHECK: store ptr %[[THIS]], ptr %[[THIS_ADDR]], align 8
+// CHECK: %[[THIS1:.*]] = load ptr, ptr %[[THIS_ADDR]], align 8
+// CHECK: %[[X:.*]] = getelementptr inbounds %[[STRUCT_B:.*]], ptr %[[THIS1]], i32 0, i32 2
+// CHECK: store i32 123, ptr %[[X]], align 16
+
+// CHECK: define linkonce_odr void @_ZN20virtualBaseAlignment1BC2Ev(ptr {{[^,]*}} %[[THIS:.*]], ptr noundef %{{.*}})
+// CHECK: %[[THIS_ADDR:.*]] = alloca ptr, align 8
+// CHECK: store ptr %[[THIS]], ptr %[[THIS_ADDR]], align 8
+// CHECK: %[[THIS1:.*]] = load ptr, ptr %[[THIS_ADDR]], align 8
+// CHECK: %[[X:.*]] = getelementptr inbounds %[[STRUCT_B]], ptr %[[THIS1]], i32 0, i32 2
+// CHECK: store i32 123, ptr %[[X]], align 8
struct A {
__attribute__((aligned(16))) double data1;
diff --git a/clang/test/CodeGenCXX/virtual-destructor-calls.cpp b/clang/test/CodeGenCXX/virtual-destructor-calls.cpp
index 307ad9ddacb3a..7923c2579ad37 100644
--- a/clang/test/CodeGenCXX/virtual-destructor-calls.cpp
+++ b/clang/test/CodeGenCXX/virtual-destructor-calls.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases -O1 -disable-llvm-passes | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases -O1 -disable-llvm-passes | FileCheck %s
struct Member {
~Member();
@@ -17,16 +17,16 @@ struct B : A {
// CHECK: @_ZN1BD1Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN1BD2Ev
// (aliases from C)
-// CHECK: @_ZN1CD2Ev ={{.*}} unnamed_addr alias {{.*}}, bitcast {{.*}} @_ZN1BD2Ev
+// CHECK: @_ZN1CD2Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN1BD2Ev
// CHECK: @_ZN1CD1Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN1CD2Ev
// Base dtor: actually calls A's base dtor.
-// CHECK-LABEL: define{{.*}} void @_ZN1BD2Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1BD2Ev(ptr {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN6MemberD1Ev
// CHECK: call void @_ZN1AD2Ev
// Deleting dtor: defers to the complete dtor.
-// CHECK-LABEL: define{{.*}} void @_ZN1BD0Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1BD0Ev(ptr {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN1BD1Ev
// CHECK: call void @_ZdlPv
@@ -41,7 +41,7 @@ C::~C() { }
// Complete dtor: just an alias (checked above).
// Deleting dtor: defers to the complete dtor.
-// CHECK-LABEL: define{{.*}} void @_ZN1CD0Ev(%struct.C* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1CD0Ev(ptr {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN1CD1Ev
// CHECK: call void @_ZdlPv
diff --git a/clang/test/CodeGenCXX/virtual-function-elimination.cpp b/clang/test/CodeGenCXX/virtual-function-elimination.cpp
index 4c113abc63764..465933c7a452d 100644
--- a/clang/test/CodeGenCXX/virtual-function-elimination.cpp
+++ b/clang/test/CodeGenCXX/virtual-function-elimination.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -flto -flto-unit -fvirtual-function-elimination -fwhole-program-vtables -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang -Xclang -no-opaque-pointers -target x86_64-unknown-linux -flto -fvirtual-function-elimination -fno-virtual-function-elimination -fwhole-program-vtables -S -emit-llvm -o - %s | FileCheck %s -check-prefix=NOVFE
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -flto -flto-unit -fvirtual-function-elimination -fwhole-program-vtables -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target x86_64-unknown-linux -flto -fvirtual-function-elimination -fno-virtual-function-elimination -fwhole-program-vtables -S -emit-llvm -o - %s | FileCheck %s -check-prefix=NOVFE
struct __attribute__((visibility("default"))) A {
virtual void foo();
@@ -9,10 +9,10 @@ void test_1(A *p) {
// A has default visibility, so no need for type.checked.load.
// CHECK-LABEL: define{{.*}} void @_Z6test_1P1A
// NOVFE-LABEL: define dso_local void @_Z6test_1P1A
-// CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds void (%struct.A*)*, void (%struct.A*)** {{%.+}}, i64 0
-// NOVFE: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds void (%struct.A*)*, void (%struct.A*)** {{%.+}}, i64 0
-// CHECK: [[FN_PTR:%.+]] = load void (%struct.A*)*, void (%struct.A*)** [[FN_PTR_ADDR]]
-// NOVFE: [[FN_PTR:%.+]] = load void (%struct.A*)*, void (%struct.A*)** [[FN_PTR_ADDR]]
+// CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds ptr, ptr {{%.+}}, i64 0
+// NOVFE: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds ptr, ptr {{%.+}}, i64 0
+// CHECK: [[FN_PTR:%.+]] = load ptr, ptr [[FN_PTR_ADDR]]
+// NOVFE: [[FN_PTR:%.+]] = load ptr, ptr [[FN_PTR_ADDR]]
// CHECK: call void [[FN_PTR]](
// NOVFE: call void [[FN_PTR]](
p->foo();
@@ -27,10 +27,10 @@ void test_2(B *p) {
// B has public LTO visibility, so no need for type.checked.load.
// CHECK-LABEL: define{{.*}} void @_Z6test_2P1B
// NOVFE-LABEL: define dso_local void @_Z6test_2P1B
-// CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds void (%struct.B*)*, void (%struct.B*)** {{%.+}}, i64 0
-// NOVFE: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds void (%struct.B*)*, void (%struct.B*)** {{%.+}}, i64 0
-// CHECK: [[FN_PTR:%.+]] = load void (%struct.B*)*, void (%struct.B*)** [[FN_PTR_ADDR]]
-// NOVFE: [[FN_PTR:%.+]] = load void (%struct.B*)*, void (%struct.B*)** [[FN_PTR_ADDR]]
+// CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds ptr, ptr {{%.+}}, i64 0
+// NOVFE: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds ptr, ptr {{%.+}}, i64 0
+// CHECK: [[FN_PTR:%.+]] = load ptr, ptr [[FN_PTR_ADDR]]
+// NOVFE: [[FN_PTR:%.+]] = load ptr, ptr [[FN_PTR_ADDR]]
// CHECK: call void [[FN_PTR]](
// NOVFE: call void [[FN_PTR]](
p->foo();
@@ -46,11 +46,10 @@ void test_3(C *p) {
// C has hidden visibility, so we generate type.checked.load to allow VFE.
// CHECK-LABEL: define{{.*}} void @_Z6test_3P1C
// NOVFE-LABEL: define dso_local void @_Z6test_3P1C
-// CHECK: [[LOAD:%.+]] = call { i8*, i1 } @llvm.type.checked.load(i8* {{%.+}}, i32 0, metadata !"_ZTS1C")
-// NOVFE: call i1 @llvm.type.test(i8* {{%.+}}, metadata !"_ZTS1C")
-// CHECK: [[FN_PTR_I8:%.+]] = extractvalue { i8*, i1 } [[LOAD]], 0
-// NOVFE: [[FN_PTR:%.+]] = load void (%struct.C*)*, void (%struct.C*)** {{%.+}}, align 8
-// CHECK: [[FN_PTR:%.+]] = bitcast i8* [[FN_PTR_I8]] to void (%struct.C*)*
+// CHECK: [[LOAD:%.+]] = call { ptr, i1 } @llvm.type.checked.load(ptr {{%.+}}, i32 0, metadata !"_ZTS1C")
+// NOVFE: call i1 @llvm.type.test(ptr {{%.+}}, metadata !"_ZTS1C")
+// CHECK: [[FN_PTR:%.+]] = extractvalue { ptr, i1 } [[LOAD]], 0
+// NOVFE: [[FN_PTR:%.+]] = load ptr, ptr {{%.+}}, align 8
// CHECK: call void [[FN_PTR]](
// NOVFE: call void [[FN_PTR]](
p->foo();
@@ -61,11 +60,10 @@ void test_4(C *p) {
// rather than adding it to the pointer with a GEP.
// CHECK-LABEL: define{{.*}} void @_Z6test_4P1C
// NOVFE-LABEL: define dso_local void @_Z6test_4P1C
-// CHECK: [[LOAD:%.+]] = call { i8*, i1 } @llvm.type.checked.load(i8* {{%.+}}, i32 8, metadata !"_ZTS1C")
-// NOVFE: call i1 @llvm.type.test(i8* {{%.+}}, metadata !"_ZTS1C")
-// CHECK: [[FN_PTR_I8:%.+]] = extractvalue { i8*, i1 } [[LOAD]], 0
-// NOVFE: [[FN_PTR:%.+]] = load void (%struct.C*)*, void (%struct.C*)** {{%.+}}, align 8
-// CHECK: [[FN_PTR:%.+]] = bitcast i8* [[FN_PTR_I8]] to void (%struct.C*)*
+// CHECK: [[LOAD:%.+]] = call { ptr, i1 } @llvm.type.checked.load(ptr {{%.+}}, i32 8, metadata !"_ZTS1C")
+// NOVFE: call i1 @llvm.type.test(ptr {{%.+}}, metadata !"_ZTS1C")
+// CHECK: [[FN_PTR:%.+]] = extractvalue { ptr, i1 } [[LOAD]], 0
+// NOVFE: [[FN_PTR:%.+]] = load ptr, ptr {{%.+}}, align 8
// CHECK: call void [[FN_PTR]](
// NOVFE: call void [[FN_PTR]](
p->bar();
@@ -81,15 +79,15 @@ void test_5(C *p, void (C::*q)(void)) {
// codegen changes on the non-virtual side.
// CHECK-LABEL: define{{.*}} void @_Z6test_5P1CMS_FvvE(
// NOVFE-LABEL: define dso_local void @_Z6test_5P1CMS_FvvE(
-// CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr i8, i8* %vtable, i64 {{%.+}}
-// CHECK: [[LOAD:%.+]] = call { i8*, i1 } @llvm.type.checked.load(i8* [[FN_PTR_ADDR]], i32 0, metadata !"_ZTSM1CFvvE.virtual")
-// NOVFE-NOT: call { i8*, i1 } @llvm.type.checked.load(i8* {{%.+}}, i32 0, metadata !"_ZTSM1CFvvE.virtual")
-// CHECK: [[FN_PTR_I8:%.+]] = extractvalue { i8*, i1 } [[LOAD]], 0
-// CHECK: [[FN_PTR:%.+]] = bitcast i8* [[FN_PTR_I8]] to void (%struct.C*)*
-// NOVFE: [[FN_PTR:%.+]] = load void (%struct.C*)*, void (%struct.C*)** {{%.+}}, align 8
+// CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr i8, ptr %vtable, i64 {{%.+}}
+// CHECK: [[LOAD:%.+]] = call { ptr, i1 } @llvm.type.checked.load(ptr [[FN_PTR_ADDR]], i32 0, metadata !"_ZTSM1CFvvE.virtual")
+// NOVFE-NOT: call { ptr, i1 } @llvm.type.checked.load(ptr {{%.+}}, i32 0, metadata !"_ZTSM1CFvvE.virtual")
+// NOVFE: call i1 @llvm.type.test(ptr {{%.+}}, metadata !"_ZTSM1CFvvE.virtual")
+// CHECK: [[FN_PTR:%.+]] = extractvalue { ptr, i1 } [[LOAD]], 0
+// NOVFE: [[FN_PTR:%.+]] = load ptr, ptr {{%.+}}, align 8
-// CHECK: [[PHI:%.+]] = phi void (%struct.C*)* {{.*}}[ [[FN_PTR]], {{.*}} ]
-// NOVFE: [[PHI:%.+]] = phi void (%struct.C*)* {{.*}}[ [[FN_PTR]], {{.*}} ]
+// CHECK: [[PHI:%.+]] = phi ptr [ [[FN_PTR]], {{.*}} ]
+// NOVFE: [[PHI:%.+]] = phi ptr [ [[FN_PTR]], {{.*}} ]
// CHECK: call void [[PHI]](
// NOVFE: call void [[PHI]](
(p->*q)();
diff --git a/clang/test/CodeGenCXX/vla-lambda-capturing.cpp b/clang/test/CodeGenCXX/vla-lambda-capturing.cpp
index 8afc16970f7ff..d19bec5ae19a7 100644
--- a/clang/test/CodeGenCXX/vla-lambda-capturing.cpp
+++ b/clang/test/CodeGenCXX/vla-lambda-capturing.cpp
@@ -1,28 +1,28 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -emit-pch -o %t
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -include-pch %t -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++11 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++11 -emit-pch -o %t
+// RUN: %clang_cc1 %s -std=c++11 -include-pch %t -emit-llvm -o - | FileCheck %s
#ifndef HEADER
#define HEADER
typedef __INTPTR_TYPE__ intptr_t;
-// CHECK-DAG: [[CAP_TYPE1:%.+]] = type { [[INTPTR_T:i.+]], [[INTPTR_T]]*, [[INTPTR_T]]* }
-// CHECK-DAG: [[CAP_TYPE2:%.+]] = type { [[INTPTR_T]], [[INTPTR_T]]* }
-// CHECK-DAG: [[CAP_TYPE3:%.+]] = type { [[INTPTR_T]]*, [[INTPTR_T]], [[INTPTR_T]], [[INTPTR_T]]*, [[INTPTR_T]]* }
-// CHECK-DAG: [[CAP_TYPE4:%.+]] = type { [[INTPTR_T]]*, [[INTPTR_T]], [[INTPTR_T]]*, [[INTPTR_T]], [[INTPTR_T]]* }
+// CHECK-DAG: [[CAP_TYPE1:%.+]] = type { [[INTPTR_T:i.+]], ptr, ptr }
+// CHECK-DAG: [[CAP_TYPE2:%.+]] = type { [[INTPTR_T]], ptr }
+// CHECK-DAG: [[CAP_TYPE3:%.+]] = type { ptr, [[INTPTR_T]], [[INTPTR_T]], ptr, ptr }
+// CHECK-DAG: [[CAP_TYPE4:%.+]] = type { ptr, [[INTPTR_T]], ptr, [[INTPTR_T]], ptr }
// CHECK: define {{.*}}void [[G:@.+]](
// CHECK: [[N_ADDR:%.+]] = alloca [[INTPTR_T]]
-// CHECK: store [[INTPTR_T]] %{{.+}}, [[INTPTR_T]]* [[N_ADDR]]
-// CHECK: [[N_VAL:%.+]] = load [[INTPTR_T]], [[INTPTR_T]]* [[N_ADDR]]
-// CHECK: [[CAP_EXPR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE1]], [[CAP_TYPE1]]* [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 0
-// CHECK: store [[INTPTR_T]] [[N_VAL]], [[INTPTR_T]]* [[CAP_EXPR_REF]]
-// CHECK: [[CAP_BUFFER_ADDR:%.+]] = getelementptr inbounds [[CAP_TYPE1]], [[CAP_TYPE1]]* [[CAP_ARG]], i{{.+}} 0, i{{.+}} 1
-// CHECK: store [[INTPTR_T]]* %{{.+}}, [[INTPTR_T]]** [[CAP_BUFFER_ADDR]]
-// CHECK: [[CAP_N_REF:%.+]] = getelementptr inbounds [[CAP_TYPE1]], [[CAP_TYPE1]]* [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store [[INTPTR_T]]* [[N_ADDR]], [[INTPTR_T]]** [[CAP_N_REF]]
-// CHECK: call{{.*}} void [[G_LAMBDA:@.+]]([[CAP_TYPE1]]* {{[^,]*}} [[CAP_ARG]])
+// CHECK: store [[INTPTR_T]] %{{.+}}, ptr [[N_ADDR]]
+// CHECK: [[N_VAL:%.+]] = load [[INTPTR_T]], ptr [[N_ADDR]]
+// CHECK: [[CAP_EXPR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE1]], ptr [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 0
+// CHECK: store [[INTPTR_T]] [[N_VAL]], ptr [[CAP_EXPR_REF]]
+// CHECK: [[CAP_BUFFER_ADDR:%.+]] = getelementptr inbounds [[CAP_TYPE1]], ptr [[CAP_ARG]], i{{.+}} 0, i{{.+}} 1
+// CHECK: store ptr %{{.+}}, ptr [[CAP_BUFFER_ADDR]]
+// CHECK: [[CAP_N_REF:%.+]] = getelementptr inbounds [[CAP_TYPE1]], ptr [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 2
+// CHECK: store ptr [[N_ADDR]], ptr [[CAP_N_REF]]
+// CHECK: call{{.*}} void [[G_LAMBDA:@.+]](ptr {{[^,]*}} [[CAP_ARG]])
// CHECK: ret void
void g(intptr_t n) {
intptr_t buffer[n];
@@ -31,13 +31,13 @@ void g(intptr_t n) {
}();
}
-// CHECK: void [[G_LAMBDA]]([[CAP_TYPE1]]*
-// CHECK: [[THIS:%.+]] = load [[CAP_TYPE1]]*, [[CAP_TYPE1]]**
-// CHECK: [[N_ADDR:%.+]] = getelementptr inbounds [[CAP_TYPE1]], [[CAP_TYPE1]]* [[THIS]], i{{.+}} 0, i{{.+}} 0
-// CHECK: [[N:%.+]] = load [[INTPTR_T]], [[INTPTR_T]]* [[N_ADDR]]
-// CHECK: [[BUFFER_ADDR:%.+]] = getelementptr inbounds [[CAP_TYPE1]], [[CAP_TYPE1]]* [[THIS]], i{{.+}} 0, i{{.+}} 1
-// CHECK: [[BUFFER:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[BUFFER_ADDR]]
-// CHECK: call i{{.+}}* @llvm.stacksave()
+// CHECK: void [[G_LAMBDA]](ptr
+// CHECK: [[THIS:%.+]] = load ptr, ptr
+// CHECK: [[N_ADDR:%.+]] = getelementptr inbounds [[CAP_TYPE1]], ptr [[THIS]], i{{.+}} 0, i{{.+}} 0
+// CHECK: [[N:%.+]] = load [[INTPTR_T]], ptr [[N_ADDR]]
+// CHECK: [[BUFFER_ADDR:%.+]] = getelementptr inbounds [[CAP_TYPE1]], ptr [[THIS]], i{{.+}} 0, i{{.+}} 1
+// CHECK: [[BUFFER:%.+]] = load ptr, ptr [[BUFFER_ADDR]]
+// CHECK: call ptr @llvm.stacksave()
// CHECK: alloca [[INTPTR_T]], [[INTPTR_T]] [[N]]
// CHECK: call void @llvm.stackrestore(
// CHECK: ret void
@@ -82,89 +82,89 @@ int main() {
// CHECK: define linkonce_odr {{.*}}void [[F_INT]]([[INTPTR_T]]
// CHECK: [[SIZE:%.+]] = add
-// CHECK: call i{{.+}}* @llvm.stacksave()
+// CHECK: call ptr @llvm.stacksave()
// CHECK: [[BUFFER_ADDR:%.+]] = alloca [[INTPTR_T]], [[INTPTR_T]] [[SIZE]]
-// CHECK: [[CAP_SIZE_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]], [[CAP_TYPE2]]* [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 0
-// CHECK: store [[INTPTR_T]] [[SIZE]], [[INTPTR_T]]* [[CAP_SIZE_REF]]
-// CHECK: [[CAP_BUFFER_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]], [[CAP_TYPE2]]* [[CAP_ARG]], i{{.+}} 0, i{{.+}} 1
-// CHECK: store [[INTPTR_T]]* [[BUFFER_ADDR]], [[INTPTR_T]]** [[CAP_BUFFER_ADDR_REF]]
-// CHECK: call{{.*}} void [[F_INT_LAMBDA:@.+]]([[CAP_TYPE2]]* {{[^,]*}} [[CAP_ARG]])
+// CHECK: [[CAP_SIZE_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]], ptr [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 0
+// CHECK: store [[INTPTR_T]] [[SIZE]], ptr [[CAP_SIZE_REF]]
+// CHECK: [[CAP_BUFFER_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]], ptr [[CAP_ARG]], i{{.+}} 0, i{{.+}} 1
+// CHECK: store ptr [[BUFFER_ADDR]], ptr [[CAP_BUFFER_ADDR_REF]]
+// CHECK: call{{.*}} void [[F_INT_LAMBDA:@.+]](ptr {{[^,]*}} [[CAP_ARG]])
// CHECK: call void @llvm.stackrestore(
// CHECK: ret void
// CHECK: void [[B_INT]]([[INTPTR_T]]
// CHECK: [[SIZE1:%.+]] = call {{.*}}[[INTPTR_T]]
-// CHECK: call i{{.+}}* @llvm.stacksave()
+// CHECK: call ptr @llvm.stacksave()
// CHECK: [[BUFFER2_ADDR:%.+]] = alloca [[INTPTR_T]], [[INTPTR_T]] [[SIZE1]]
// CHECK: [[SIZE2:%.+]] = add
// CHECK: [[BUFFER1_ADDR:%.+]] = alloca [[INTPTR_T]], [[INTPTR_T]]
-// CHECK: [[CAP_N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 0
-// CHECK: store [[INTPTR_T]]* {{%.+}}, [[INTPTR_T]]** [[CAP_N_ADDR_REF]]
-// CHECK: [[CAP_SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[CAP_ARG]], i{{.+}} 0, i{{.+}} 1
-// CHECK: store i{{[0-9]+}} [[SIZE2]], i{{[0-9]+}}* [[CAP_SIZE2_REF]]
-// CHECK: [[CAP_SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[CAP_ARG]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i{{[0-9]+}} [[SIZE1]], i{{[0-9]+}}* [[CAP_SIZE1_REF]]
-// CHECK: [[CAP_BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[CAP_ARG]], i{{.+}} 0, i{{.+}} 3
-// CHECK: store [[INTPTR_T]]* [[BUFFER1_ADDR]], [[INTPTR_T]]** [[CAP_BUFFER1_ADDR_REF]]
-// CHECK: [[CAP_BUFFER2_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[CAP_ARG]], i{{.+}} 0, i{{.+}} 4
-// CHECK: store [[INTPTR_T]]* [[BUFFER2_ADDR]], [[INTPTR_T]]** [[CAP_BUFFER2_ADDR_REF]]
-// CHECK: call{{.*}} void [[B_INT_LAMBDA:@.+]]([[CAP_TYPE3]]* {{[^,]*}} [[CAP_ARG]])
+// CHECK: [[CAP_N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[CAP_ARG:%.+]], i{{.+}} 0, i{{.+}} 0
+// CHECK: store ptr {{%.+}}, ptr [[CAP_N_ADDR_REF]]
+// CHECK: [[CAP_SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[CAP_ARG]], i{{.+}} 0, i{{.+}} 1
+// CHECK: store i{{[0-9]+}} [[SIZE2]], ptr [[CAP_SIZE2_REF]]
+// CHECK: [[CAP_SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[CAP_ARG]], i{{.+}} 0, i{{.+}} 2
+// CHECK: store i{{[0-9]+}} [[SIZE1]], ptr [[CAP_SIZE1_REF]]
+// CHECK: [[CAP_BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[CAP_ARG]], i{{.+}} 0, i{{.+}} 3
+// CHECK: store ptr [[BUFFER1_ADDR]], ptr [[CAP_BUFFER1_ADDR_REF]]
+// CHECK: [[CAP_BUFFER2_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[CAP_ARG]], i{{.+}} 0, i{{.+}} 4
+// CHECK: store ptr [[BUFFER2_ADDR]], ptr [[CAP_BUFFER2_ADDR_REF]]
+// CHECK: call{{.*}} void [[B_INT_LAMBDA:@.+]](ptr {{[^,]*}} [[CAP_ARG]])
// CHECK: call void @llvm.stackrestore(
// CHECK: ret void
-// CHECK: define linkonce_odr{{.*}} void [[F_INT_LAMBDA]]([[CAP_TYPE2]]*
-// CHECK: [[THIS:%.+]] = load [[CAP_TYPE2]]*, [[CAP_TYPE2]]**
-// CHECK: [[SIZE_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]], [[CAP_TYPE2]]* [[THIS]], i{{.+}} 0, i{{.+}} 0
-// CHECK: [[SIZE:%.+]] = load [[INTPTR_T]], [[INTPTR_T]]* [[SIZE_REF]]
-// CHECK: call i{{.+}}* @llvm.stacksave()
+// CHECK: define linkonce_odr{{.*}} void [[F_INT_LAMBDA]](ptr
+// CHECK: [[THIS:%.+]] = load ptr, ptr
+// CHECK: [[SIZE_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]], ptr [[THIS]], i{{.+}} 0, i{{.+}} 0
+// CHECK: [[SIZE:%.+]] = load [[INTPTR_T]], ptr [[SIZE_REF]]
+// CHECK: call ptr @llvm.stacksave()
// CHECK: alloca [[INTPTR_T]], [[INTPTR_T]] [[SIZE]]
// CHECK: call void @llvm.stackrestore(
// CHECK: ret void
-// CHECK: define linkonce_odr{{.*}} void [[B_INT_LAMBDA]]([[CAP_TYPE3]]*
-// CHECK: [[SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
-// CHECK: [[SIZE2:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[SIZE2_REF]]
-// CHECK: [[SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
-// CHECK: [[SIZE1:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[SIZE1_REF]]
-// CHECK: [[BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
-// CHECK: [[BUFFER1_ADDR:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[BUFFER1_ADDR_REF]]
-// CHECK: [[N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
-// CHECK: [[N_ADDR:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[N_ADDR_REF]]
-// CHECK: [[N:%.+]] = load [[INTPTR_T]], [[INTPTR_T]]* [[N_ADDR]]
+// CHECK: define linkonce_odr{{.*}} void [[B_INT_LAMBDA]](ptr
+// CHECK: [[SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
+// CHECK: [[SIZE2:%.+]] = load i{{[0-9]+}}, ptr [[SIZE2_REF]]
+// CHECK: [[SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
+// CHECK: [[SIZE1:%.+]] = load i{{[0-9]+}}, ptr [[SIZE1_REF]]
+// CHECK: [[BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
+// CHECK: [[BUFFER1_ADDR:%.+]] = load ptr, ptr [[BUFFER1_ADDR_REF]]
+// CHECK: [[N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
+// CHECK: [[N_ADDR:%.+]] = load ptr, ptr [[N_ADDR_REF]]
+// CHECK: [[N:%.+]] = load [[INTPTR_T]], ptr [[N_ADDR]]
// CHECK: [[ELEM_OFFSET:%.+]] = mul {{.*}} i{{[0-9]+}} [[N]], [[SIZE1]]
-// CHECK: [[ELEM_ADDR:%.+]] = getelementptr inbounds [[INTPTR_T]], [[INTPTR_T]]* [[BUFFER1_ADDR]], i{{[0-9]+}} [[ELEM_OFFSET]]
+// CHECK: [[ELEM_ADDR:%.+]] = getelementptr inbounds [[INTPTR_T]], ptr [[BUFFER1_ADDR]], i{{[0-9]+}} [[ELEM_OFFSET]]
// CHECK: [[SIZEOF:%.+]] = mul {{.*}} i{{[0-9]+}} {{[0-9]+}}, [[SIZE1]]
-// CHECK: [[N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
-// CHECK: [[N_ADDR:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[N_ADDR_REF]]
-// CHECK: store [[INTPTR_T]] {{%.+}}, [[INTPTR_T]]* [[N_ADDR]]
-// CHECK: [[N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[CAP:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
-// CHECK: [[N_ADDR_REF_ORIG:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
-// CHECK: [[N_ADDR_ORIG:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[N_ADDR_REF_ORIG]]
-// CHECK: store [[INTPTR_T]]* [[N_ADDR_ORIG]], [[INTPTR_T]]** [[N_ADDR_REF]]
-// CHECK: [[SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
-// CHECK: store i{{[0-9]+}} [[SIZE1]], i{{[0-9]+}}* [[SIZE1_REF]]
-// CHECK: [[BUFFER2_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
-// CHECK: [[BUFFER2_ADDR_REF_ORIG:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 4
-// CHECK: [[BUFFER2_ADDR_ORIG:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[BUFFER2_ADDR_REF_ORIG]]
-// CHECK: store [[INTPTR_T]]* [[BUFFER2_ADDR_ORIG]], [[INTPTR_T]]** [[BUFFER2_ADDR_REF]]
-// CHECK: [[SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
-// CHECK: store i{{[0-9]+}} [[SIZE2]], i{{[0-9]+}}* [[SIZE2_REF]]
-// CHECK: [[BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 4
-// CHECK: [[BUFFER1_ADDR_REF_ORIG:%.+]] = getelementptr inbounds [[CAP_TYPE3]], [[CAP_TYPE3]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
-// CHECK: [[BUFFER1_ADDR_ORIG:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[BUFFER1_ADDR_REF_ORIG]]
-// CHECK: store [[INTPTR_T]]* [[BUFFER1_ADDR_ORIG]], [[INTPTR_T]]** [[BUFFER1_ADDR_REF]]
-// CHECK: call{{.*}} void [[B_INT_LAMBDA_LAMBDA:@.+]]([[CAP_TYPE4]]* {{[^,]*}} [[CAP]])
+// CHECK: [[N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
+// CHECK: [[N_ADDR:%.+]] = load ptr, ptr [[N_ADDR_REF]]
+// CHECK: store [[INTPTR_T]] {{%.+}}, ptr [[N_ADDR]]
+// CHECK: [[N_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[CAP:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
+// CHECK: [[N_ADDR_REF_ORIG:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
+// CHECK: [[N_ADDR_ORIG:%.+]] = load ptr, ptr [[N_ADDR_REF_ORIG]]
+// CHECK: store ptr [[N_ADDR_ORIG]], ptr [[N_ADDR_REF]]
+// CHECK: [[SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
+// CHECK: store i{{[0-9]+}} [[SIZE1]], ptr [[SIZE1_REF]]
+// CHECK: [[BUFFER2_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
+// CHECK: [[BUFFER2_ADDR_REF_ORIG:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 4
+// CHECK: [[BUFFER2_ADDR_ORIG:%.+]] = load ptr, ptr [[BUFFER2_ADDR_REF_ORIG]]
+// CHECK: store ptr [[BUFFER2_ADDR_ORIG]], ptr [[BUFFER2_ADDR_REF]]
+// CHECK: [[SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
+// CHECK: store i{{[0-9]+}} [[SIZE2]], ptr [[SIZE2_REF]]
+// CHECK: [[BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[CAP]], i{{[0-9]+}} 0, i{{[0-9]+}} 4
+// CHECK: [[BUFFER1_ADDR_REF_ORIG:%.+]] = getelementptr inbounds [[CAP_TYPE3]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
+// CHECK: [[BUFFER1_ADDR_ORIG:%.+]] = load ptr, ptr [[BUFFER1_ADDR_REF_ORIG]]
+// CHECK: store ptr [[BUFFER1_ADDR_ORIG]], ptr [[BUFFER1_ADDR_REF]]
+// CHECK: call{{.*}} void [[B_INT_LAMBDA_LAMBDA:@.+]](ptr {{[^,]*}} [[CAP]])
// CHECK: ret void
-// CHECK: define linkonce_odr{{.*}} void [[B_INT_LAMBDA_LAMBDA]]([[CAP_TYPE4]]*
-// CHECK: [[SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[THIS:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
-// CHECK: [[SIZE1:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[SIZE1_REF]]
-// CHECK: [[SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
-// CHECK: [[SIZE2:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[SIZE2_REF]]
-// CHECK: [[BUFFER2_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
-// CHECK: [[BUFFER2_ADDR:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[BUFFER2_ADDR_REF]]
+// CHECK: define linkonce_odr{{.*}} void [[B_INT_LAMBDA_LAMBDA]](ptr
+// CHECK: [[SIZE1_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[THIS:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
+// CHECK: [[SIZE1:%.+]] = load i{{[0-9]+}}, ptr [[SIZE1_REF]]
+// CHECK: [[SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
+// CHECK: [[SIZE2:%.+]] = load i{{[0-9]+}}, ptr [[SIZE2_REF]]
+// CHECK: [[BUFFER2_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
+// CHECK: [[BUFFER2_ADDR:%.+]] = load ptr, ptr [[BUFFER2_ADDR_REF]]
// CHECK: [[SIZEOF_BUFFER2:%.+]] = mul {{.*}} i{{[0-9]+}} {{[0-9]+}}, [[SIZE1]]
-// CHECK: [[BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], [[CAP_TYPE4]]* [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 4
-// CHECK: [[BUFFER1_ADDR:%.+]] = load [[INTPTR_T]]*, [[INTPTR_T]]** [[BUFFER1_ADDR_REF]]
+// CHECK: [[BUFFER1_ADDR_REF:%.+]] = getelementptr inbounds [[CAP_TYPE4]], ptr [[THIS]], i{{[0-9]+}} 0, i{{[0-9]+}} 4
+// CHECK: [[BUFFER1_ADDR:%.+]] = load ptr, ptr [[BUFFER1_ADDR_REF]]
// CHECK: [[MUL:%.+]] = mul {{.*}} i{{[0-9]+}} [[SIZE2]], [[SIZE1]]
// CHECK: mul {{.*}} i{{[0-9]+}} {{[0-9]+}}, [[MUL]]
// CHECK: ret void
diff --git a/clang/test/CodeGenCXX/volatile-1.cpp b/clang/test/CodeGenCXX/volatile-1.cpp
index bd07ebebe3d74..eefcc574e92ce 100644
--- a/clang/test/CodeGenCXX/volatile-1.cpp
+++ b/clang/test/CodeGenCXX/volatile-1.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -Wno-unused-value -triple %itanium_abi_triple -emit-llvm %s -std=c++98 -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -Wno-unused-value -triple %itanium_abi_triple -emit-llvm %s -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
+// RUN: %clang_cc1 -Wno-unused-value -triple %itanium_abi_triple -emit-llvm %s -std=c++98 -o - | FileCheck %s
+// RUN: %clang_cc1 -Wno-unused-value -triple %itanium_abi_triple -emit-llvm %s -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
// CHECK: @i = {{(dso_local )?}}global [[INT:i[0-9]+]] 0
volatile int i, j, k;
@@ -25,57 +25,57 @@ void test() {
// should not load in C++98
i;
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* @i
+ // CHECK11-NEXT: load volatile [[INT]], ptr @i
(float)(ci);
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK-NEXT: load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
// CHECK-NEXT: sitofp [[INT]]
// These are not uses in C++98:
// [expr.static.cast]p6:
// The lvalue-to-rvalue . . . conversions are not applied to the expression.
(void)ci;
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK11-NEXT: load volatile [[INT]], ptr @ci
+ // CHECK11-NEXT: load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
(void)a;
(void)(ci=ci);
- // CHECK-NEXT: [[R:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: [[I:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[R:%.*]] = load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: [[I:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: store volatile [[INT]] [[R]], ptr @ci
+ // CHECK-NEXT: store volatile [[INT]] [[I]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
(void)(i=j);
- // CHECK-NEXT: [[T:%.*]] = load volatile [[INT]], [[INT]]* @j
- // CHECK-NEXT: store volatile [[INT]] [[T]], [[INT]]* @i
+ // CHECK-NEXT: [[T:%.*]] = load volatile [[INT]], ptr @j
+ // CHECK-NEXT: store volatile [[INT]] [[T]], ptr @i
ci+=ci;
- // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
// Not sure why they're ordered this way.
// CHECK-NEXT: [[R:%.*]] = add [[INT]] [[R2]], [[R1]]
// CHECK-NEXT: [[I:%.*]] = add [[INT]] [[I2]], [[I1]]
- // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK-NEXT: store volatile [[INT]] [[R]], ptr @ci
+ // CHECK-NEXT: store volatile [[INT]] [[I]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
// Note that C++ requires an extra load volatile over C from the LHS of the '+'.
(ci += ci) + ci;
- // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
// CHECK-NEXT: [[R:%.*]] = add [[INT]] [[R2]], [[R1]]
// CHECK-NEXT: [[I:%.*]] = add [[INT]] [[I2]], [[I1]]
- // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0)
- // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK-NEXT: store volatile [[INT]] [[R]], ptr @ci
+ // CHECK-NEXT: store volatile [[INT]] [[I]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]], ptr @ci
+ // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
// These additions can be elided.
// CHECK-NEXT: add [[INT]] [[R1]], [[R2]]
// CHECK-NEXT: add [[INT]] [[I1]], [[I2]]
@@ -167,24 +167,24 @@ void test() {
// CHECK-NEXT: store volatile
i=i,k; // k is also a load in C++11
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* @i
- // CHECK-NEXT: store volatile {{.*}}, [[INT]]* @i
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* @k
+ // CHECK-NEXT: load volatile [[INT]], ptr @i
+ // CHECK-NEXT: store volatile {{.*}}, ptr @i
+ // CHECK11-NEXT: load volatile [[INT]], ptr @k
(i=j,k=j);
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* @j
- // CHECK-NEXT: store volatile {{.*}}, [[INT]]* @i
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* @j
- // CHECK-NEXT: store volatile {{.*}}, [[INT]]* @k
+ // CHECK-NEXT: load volatile [[INT]], ptr @j
+ // CHECK-NEXT: store volatile {{.*}}, ptr @i
+ // CHECK-NEXT: load volatile [[INT]], ptr @j
+ // CHECK-NEXT: store volatile {{.*}}, ptr @k
(i=j,k); // k is also a load in C++11
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* @j
- // CHECK-NEXT: store volatile {{.*}}, [[INT]]* @i
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* @k
+ // CHECK-NEXT: load volatile [[INT]], ptr @j
+ // CHECK-NEXT: store volatile {{.*}}, ptr @i
+ // CHECK11-NEXT: load volatile [[INT]], ptr @k
(i,j); // i and j both are loads in C++11
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* @i
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* @j
+ // CHECK11-NEXT: load volatile [[INT]], ptr @i
+ // CHECK11-NEXT: load volatile [[INT]], ptr @j
// Extra load in C++.
i=c=k;
@@ -202,17 +202,17 @@ void test() {
// CHECK-NEXT: store volatile
ci; // ci is a load in C++11
- // CHECK11-NEXT: load volatile {{.*}} @ci, i32 0, i32 0
+ // CHECK11-NEXT: load volatile {{.*}} @ci
// CHECK11-NEXT: load volatile {{.*}} @ci, i32 0, i32 1
asm("nop"); // CHECK-NEXT: call void asm
(int)ci;
- // CHECK-NEXT: load volatile {{.*}} @ci, i32 0, i32 0
+ // CHECK-NEXT: load volatile {{.*}} @ci
// CHECK-NEXT: load volatile {{.*}} @ci, i32 0, i32 1
(bool)ci;
- // CHECK-NEXT: load volatile {{.*}} @ci, i32 0, i32 0
+ // CHECK-NEXT: load volatile {{.*}} @ci
// CHECK-NEXT: load volatile {{.*}} @ci, i32 0, i32 1
// CHECK-NEXT: icmp ne
// CHECK-NEXT: icmp ne
@@ -238,10 +238,10 @@ void test() {
// CHECK-NEXT: store volatile
__imag ci = __imag ci = __imag ci;
- // CHECK-NEXT: [[T:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: store volatile [[INT]] [[T]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: [[T:%.*]] = load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
- // CHECK-NEXT: store volatile [[INT]] [[T]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[T:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: store volatile [[INT]] [[T]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: [[T:%.*]] = load volatile [[INT]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
+ // CHECK-NEXT: store volatile [[INT]] [[T]], ptr getelementptr inbounds ([[CINT]], ptr @ci, i32 0, i32 1)
__real (i = j);
// CHECK-NEXT: load volatile
@@ -352,15 +352,15 @@ void test() {
// CHECK-NEXT: add
(i,j)=k; // i is also a load in C++11
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* @k
- // CHECK11-NEXT: load volatile [[INT]], [[INT]]* @i
- // CHECK-NEXT: store volatile {{.*}}, [[INT]]* @j
+ // CHECK-NEXT: load volatile [[INT]], ptr @k
+ // CHECK11-NEXT: load volatile [[INT]], ptr @i
+ // CHECK-NEXT: store volatile {{.*}}, ptr @j
(j=k,i)=i;
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* @i
- // CHECK-NEXT: load volatile [[INT]], [[INT]]* @k
- // CHECK-NEXT: store volatile {{.*}}, [[INT]]* @j
- // CHECK-NEXT: store volatile {{.*}}, [[INT]]* @i
+ // CHECK-NEXT: load volatile [[INT]], ptr @i
+ // CHECK-NEXT: load volatile [[INT]], ptr @k
+ // CHECK-NEXT: store volatile {{.*}}, ptr @j
+ // CHECK-NEXT: store volatile {{.*}}, ptr @i
// CHECK-NEXT: ret void
}
diff --git a/clang/test/CodeGenCXX/volatile.cpp b/clang/test/CodeGenCXX/volatile.cpp
index 14bd47b557a52..ae01881bd83aa 100644
--- a/clang/test/CodeGenCXX/volatile.cpp
+++ b/clang/test/CodeGenCXX/volatile.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s
// Check that IR gen doesn't try to do an lvalue-to-rvalue conversion
// on a volatile reference result. rdar://problem/8338198
@@ -14,9 +14,9 @@ namespace test0 {
// CHECK-LABEL: define{{.*}} void @_ZN5test04testENS_1AE(
void test(A t) {
- // CHECK: [[ARR:%.*]] = load [[A:%.*]]*, [[A:%.*]]** @_ZN5test05arrayE, align 8
- // CHECK-NEXT: [[IDX:%.*]] = getelementptr inbounds [[A]], [[A]]* [[ARR]], i64 0
- // CHECK-NEXT: [[TMP:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[A]]* @_ZNV5test01AaSERVKS0_([[A]]* {{[^,]*}} [[IDX]], [[A]]* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[T:%.*]])
+ // CHECK: [[ARR:%.*]] = load ptr, ptr @_ZN5test05arrayE, align 8
+ // CHECK-NEXT: [[IDX:%.*]] = getelementptr inbounds [[A:%.*]], ptr [[ARR]], i64 0
+ // CHECK-NEXT: [[TMP:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZNV5test01AaSERVKS0_(ptr {{[^,]*}} [[IDX]], ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[T:%.*]])
// CHECK-NEXT: ret void
array[0] = t;
}
@@ -27,8 +27,8 @@ namespace test1 {
// CHECK-LABEL: define{{.*}} void @_ZN5test14testEv()
void test() {
- // CHECK: [[TMP:%.*]] = load i32*, i32** @_ZN5test11xE, align 8
- // CHECK11-NEXT: {{%.*}} = load volatile i32, i32* [[TMP]], align 4
+ // CHECK: [[TMP:%.*]] = load ptr, ptr @_ZN5test11xE, align 8
+ // CHECK11-NEXT: {{%.*}} = load volatile i32, ptr [[TMP]], align 4
// CHECK-NEXT: ret void
*x;
}
diff --git a/clang/test/CodeGenCXX/vtable-available-externally.cpp b/clang/test/CodeGenCXX/vtable-available-externally.cpp
index ed545a46b0766..a57eb39edfe10 100644
--- a/clang/test/CodeGenCXX/vtable-available-externally.cpp
+++ b/clang/test/CodeGenCXX/vtable-available-externally.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -emit-llvm -o %t
-// RUN: %clang_cc1 -no-opaque-pointers %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -O2 -disable-llvm-passes -emit-llvm -o %t.opt
-// RUN: %clang_cc1 -no-opaque-pointers %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -O2 -disable-llvm-passes -emit-llvm -o %t.vtable -fforce-emit-vtables -fstrict-vtable-pointers -mconstructor-aliases
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -emit-llvm -o %t
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -O2 -disable-llvm-passes -emit-llvm -o %t.opt
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -O2 -disable-llvm-passes -emit-llvm -o %t.vtable -fforce-emit-vtables -fstrict-vtable-pointers -mconstructor-aliases
// RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK-TEST1 %s < %t
// RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK-TEST2 %s < %t
// RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK-TEST5 %s < %t
@@ -442,7 +442,7 @@ void testcaseB() {
namespace Test18 {
// Here vtable will be only emitted because it is referenced by assume-load
// after the Derived construction.
-// CHECK-FORCE-EMIT-DAG: @_ZTVN6Test187DerivedE = linkonce_odr unnamed_addr constant {{.*}} @_ZTIN6Test187DerivedE {{.*}} @_ZN6Test184Base3funEv {{.*}} @_ZN6Test184BaseD2Ev {{.*}} @_ZN6Test187DerivedD0Ev
+// CHECK-FORCE-EMIT-DAG: @_ZTVN6Test187DerivedE = linkonce_odr unnamed_addr constant {{.*}} @_ZTIN6Test187DerivedE, {{.*}} @_ZN6Test184Base3funEv, {{.*}} @_ZN6Test184BaseD2Ev, {{.*}} @_ZN6Test187DerivedD0Ev
// CHECK-FORCE-EMIT-DAG: define linkonce_odr void @_ZN6Test187DerivedD0Ev
// CHECK-FORCE-EMIT-DAG: define linkonce_odr void @_ZN6Test184BaseD2Ev
// CHECK-FORCE-EMIT-DAG: define linkonce_odr noundef i32 @_ZN6Test184Base3funEv
@@ -465,7 +465,7 @@ int foo() {
namespace TestTemplates {
-// CHECK-FORCE-EMIT-DAG: @_ZTVN13TestTemplates8TemplateIiEE = linkonce_odr unnamed_addr constant {{.*}} @_ZTIN13TestTemplates8TemplateIiEE {{.*}} @_ZN13TestTemplates8TemplateIiE3fooEi {{.*}}@_ZN13TestTemplates8TemplateIiE22thisShouldBeEmittedTooEi {{.*}}@_ZN13TestTemplates8TemplateIiED1Ev {{.*}}@_ZN13TestTemplates8TemplateIiED0Ev
+// CHECK-FORCE-EMIT-DAG: @_ZTVN13TestTemplates8TemplateIiEE = linkonce_odr unnamed_addr constant {{.*}} @_ZTIN13TestTemplates8TemplateIiEE, {{.*}} @_ZN13TestTemplates8TemplateIiE3fooEi, {{.*}}@_ZN13TestTemplates8TemplateIiE22thisShouldBeEmittedTooEi, {{.*}}@_ZN13TestTemplates8TemplateIiED1Ev, {{.*}}@_ZN13TestTemplates8TemplateIiED0Ev
// CHECK-FORCE-EMIT-DAG: define linkonce_odr noundef i32 @_ZN13TestTemplates8TemplateIiE22thisShouldBeEmittedTooEi
template<class T>
@@ -487,7 +487,7 @@ struct NonTemplate {
virtual ~NonTemplate();
};
-// CHECK-FORCE-EMIT-DAG: @_ZTVN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiEE = linkonce_odr {{.*}} @_ZTIN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiEE {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiE3fooEi {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiE22thisShouldBeEmittedTooEi {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiED1Ev {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiED0Ev
+// CHECK-FORCE-EMIT-DAG: @_ZTVN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiEE = linkonce_odr {{.*}} @_ZTIN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiEE, {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiE3fooEi, {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiE22thisShouldBeEmittedTooEi, {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiED1Ev, {{.*}} @_ZN13TestTemplates16OuterNonTemplate27NestedTemplateInNonTemplateIiED0Ev
struct OuterNonTemplate {
template<class T>
diff --git a/clang/test/CodeGenCXX/vtable-consteval.cpp b/clang/test/CodeGenCXX/vtable-consteval.cpp
index 5c7ad2e07a331..1454f6fde357d 100644
--- a/clang/test/CodeGenCXX/vtable-consteval.cpp
+++ b/clang/test/CodeGenCXX/vtable-consteval.cpp
@@ -1,59 +1,59 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 %s -emit-llvm -o - -triple x86_64-linux | FileCheck %s --check-prefix=ITANIUM --implicit-check-not=DoNotEmit
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 %s -emit-llvm -o - -triple x86_64-windows | FileCheck %s --check-prefix=MSABI --implicit-check-not=DoNotEmit
+// RUN: %clang_cc1 -std=c++20 %s -emit-llvm -o - -triple x86_64-linux | FileCheck %s --check-prefix=ITANIUM --implicit-check-not=DoNotEmit
+// RUN: %clang_cc1 -std=c++20 %s -emit-llvm -o - -triple x86_64-windows | FileCheck %s --check-prefix=MSABI --implicit-check-not=DoNotEmit
// FIXME: The MSVC ABI rule in use here was discussed with MS folks prior to
// them implementing virtual consteval functions, but we do not know for sure
// if this is the ABI rule they will use.
-// ITANIUM-DAG: @_ZTV1A = {{.*}} constant { [2 x i8*] } {{.*}} null, {{.*}} @_ZTI1A
-// MSABI-DAG: @[[A_VFTABLE:.*]] = {{.*}} constant { [1 x i8*] } {{.*}} @"??_R4A@@6B@"
+// ITANIUM-DAG: @_ZTV1A = {{.*}} constant { [2 x ptr] } {{.*}} null, {{.*}} @_ZTI1A
+// MSABI-DAG: @[[A_VFTABLE:.*]] = {{.*}} constant { [1 x ptr] } {{.*}} @"??_R4A@@6B@"
struct A {
virtual consteval void DoNotEmit_f() {}
};
-// ITANIUM-DAG: @a = {{.*}}global { i8** } { {{.*}} @_ZTV1A,
-// MSABI-DAG: @"?a@@3UA@@A" = {{.*}}global { i8** } { i8** @"??_7A@@6B@" }
+// ITANIUM-DAG: @a = {{.*}}global %struct.A { {{.*}} @_ZTV1A,
+// MSABI-DAG: @"?a@@3UA@@A" = {{.*}}global %struct.A { ptr @"??_7A@@6B@" }
A a;
-// ITANIUM-DAG: @_ZTV1B = {{.*}} constant { [4 x i8*] } {{.*}} null, {{.*}} @_ZTI1B {{.*}} @_ZN1B1fEv {{.*}} @_ZN1B1hEv
-// MSABI-DAG: @[[B_VFTABLE:.*]] = {{.*}} constant { [3 x i8*] } {{.*}} @"??_R4B@@6B@" {{.*}} @"?f at B@@UEAAXXZ" {{.*}} @"?h at B@@UEAAXXZ"
+// ITANIUM-DAG: @_ZTV1B = {{.*}} constant { [4 x ptr] } {{.*}} null, ptr @_ZTI1B, ptr @_ZN1B1fEv, ptr @_ZN1B1hEv
+// MSABI-DAG: @[[B_VFTABLE:.*]] = {{.*}} constant { [3 x ptr] } {{.*}} @"??_R4B@@6B@", ptr @"?f at B@@UEAAXXZ", ptr @"?h at B@@UEAAXXZ"
struct B {
virtual void f() {}
virtual consteval void DoNotEmit_g() {}
virtual void h() {}
};
-// ITANIUM-DAG: @b = {{.*}}global { i8** } { {{.*}} @_ZTV1B,
-// MSABI-DAG: @"?b@@3UB@@A" = {{.*}}global { i8** } { i8** @"??_7B@@6B@" }
+// ITANIUM-DAG: @b = {{.*}}global %struct.B { {{.*}} @_ZTV1B,
+// MSABI-DAG: @"?b@@3UB@@A" = {{.*}}global %struct.B { ptr @"??_7B@@6B@" }
B b;
-// ITANIUM-DAG: @_ZTV1C = {{.*}} constant { [4 x i8*] } {{.*}} null, {{.*}} @_ZTI1C {{.*}} @_ZN1CD1Ev {{.*}} @_ZN1CD0Ev
-// MSABI-DAG: @[[C_VFTABLE:.*]] = {{.*}} constant { [2 x i8*] } {{.*}} @"??_R4C@@6B@" {{.*}} @"??_GC@@UEAAPEAXI at Z"
+// ITANIUM-DAG: @_ZTV1C = {{.*}} constant { [4 x ptr] } {{.*}} null, ptr @_ZTI1C, ptr @_ZN1CD1Ev, ptr @_ZN1CD0Ev
+// MSABI-DAG: @[[C_VFTABLE:.*]] = {{.*}} constant { [2 x ptr] } {{.*}} @"??_R4C@@6B@", ptr @"??_GC@@UEAAPEAXI at Z"
struct C {
virtual ~C() = default;
virtual consteval C &operator=(const C&) = default;
};
-// ITANIUM-DAG: @c = {{.*}}global { i8** } { {{.*}} @_ZTV1C,
-// MSABI-DAG: @"?c@@3UC@@A" = {{.*}}global { i8** } { i8** @"??_7C@@6B@" }
+// ITANIUM-DAG: @c = {{.*}}global %struct.C { {{.*}} @_ZTV1C,
+// MSABI-DAG: @"?c@@3UC@@A" = {{.*}}global %struct.C { ptr @"??_7C@@6B@" }
C c;
-// ITANIUM-DAG: @_ZTV1D = {{.*}} constant { [4 x i8*] } {{.*}} null, {{.*}} @_ZTI1D {{.*}} @_ZN1DD1Ev {{.*}} @_ZN1DD0Ev
-// MSABI-DAG: @[[D_VFTABLE:.*]] = {{.*}} constant { [2 x i8*] } {{.*}} @"??_R4D@@6B@" {{.*}} @"??_GD@@UEAAPEAXI at Z"
+// ITANIUM-DAG: @_ZTV1D = {{.*}} constant { [4 x ptr] } {{.*}} null, ptr @_ZTI1D, ptr @_ZN1DD1Ev, ptr @_ZN1DD0Ev
+// MSABI-DAG: @[[D_VFTABLE:.*]] = {{.*}} constant { [2 x ptr] } {{.*}} @"??_R4D@@6B@", ptr @"??_GD@@UEAAPEAXI at Z"
struct D : C {};
-// ITANIUM-DAG: @d = {{.*}}global { i8** } { {{.*}} @_ZTV1D,
-// MSABI-DAG: @"?d@@3UD@@A" = {{.*}}global { i8** } { i8** @"??_7D@@6B@" }
+// ITANIUM-DAG: @d = {{.*}}global { ptr } { {{.*}} @_ZTV1D,
+// MSABI-DAG: @"?d@@3UD@@A" = {{.*}}global { ptr } { ptr @"??_7D@@6B@" }
D d;
-// ITANIUM-DAG: @_ZTV1E = {{.*}} constant { [3 x i8*] } {{.*}} null, {{.*}} @_ZTI1E {{.*}} @_ZN1E1fEv
-// MSABI-DAG: @[[E_VFTABLE:.*]] = {{.*}} constant { [2 x i8*] } {{.*}} @"??_R4E@@6B@" {{.*}} @"?f at E@@UEAAXXZ"
+// ITANIUM-DAG: @_ZTV1E = {{.*}} constant { [3 x ptr] } {{.*}} null, ptr @_ZTI1E, ptr @_ZN1E1fEv
+// MSABI-DAG: @[[E_VFTABLE:.*]] = {{.*}} constant { [2 x ptr] } {{.*}} @"??_R4E@@6B@", ptr @"?f at E@@UEAAXXZ"
struct E { virtual void f() {} };
-// ITANIUM-DAG: @e = {{.*}}global { i8** } { {{.*}} @_ZTV1E,
-// MSABI-DAG: @"?e@@3UE@@A" = {{.*}}global { i8** } { i8** @"??_7E@@6B@" }
+// ITANIUM-DAG: @e = {{.*}}global %struct.E { {{.*}} @_ZTV1E,
+// MSABI-DAG: @"?e@@3UE@@A" = {{.*}}global %struct.E { ptr @"??_7E@@6B@" }
E e;
-// ITANIUM-DAG: @_ZTV1F = {{.*}} constant { [3 x i8*] } {{.*}} null, {{.*}} @_ZTI1F {{.*}} @_ZN1E1fEv
-// MSABI-DAG: @[[F_VFTABLE:.*]] = {{.*}} constant { [2 x i8*] } {{.*}} @"??_R4F@@6B@" {{.*}} @"?f at E@@UEAAXXZ"
+// ITANIUM-DAG: @_ZTV1F = {{.*}} constant { [3 x ptr] } {{.*}} null, ptr @_ZTI1F, ptr @_ZN1E1fEv
+// MSABI-DAG: @[[F_VFTABLE:.*]] = {{.*}} constant { [2 x ptr] } {{.*}} @"??_R4F@@6B@", ptr @"?f at E@@UEAAXXZ"
struct F : E { virtual consteval void DoNotEmit_g(); };
-// ITANIUM-DAG: @f = {{.*}}global { i8** } { {{.*}} @_ZTV1F,
-// MSABI-DAG: @"?f@@3UF@@A" = {{.*}}global { i8** } { i8** @"??_7F@@6B@" }
+// ITANIUM-DAG: @f = {{.*}}global { ptr } { {{.*}} @_ZTV1F,
+// MSABI-DAG: @"?f@@3UF@@A" = {{.*}}global { ptr } { ptr @"??_7F@@6B@" }
F f;
// MSABI-DAG: @"??_7A@@6B@" = {{.*}} alias {{.*}} @[[A_VFTABLE]],
diff --git a/clang/test/CodeGenCXX/vtable-constexpr.cpp b/clang/test/CodeGenCXX/vtable-constexpr.cpp
index e3e819af158e1..ac0cbc66bc932 100644
--- a/clang/test/CodeGenCXX/vtable-constexpr.cpp
+++ b/clang/test/CodeGenCXX/vtable-constexpr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 %s -emit-llvm -o - -triple %itanium_abi_triple | FileCheck %s --implicit-check-not=DoNotEmit
+// RUN: %clang_cc1 -std=c++20 %s -emit-llvm -o - -triple %itanium_abi_triple | FileCheck %s --implicit-check-not=DoNotEmit
// constexpr virtual functions can be called at runtime and go in the vtable as
// normal. But they are implicitly inline so are never the key function.
@@ -8,7 +8,7 @@ struct DoNotEmit {
};
constexpr void DoNotEmit::f() {}
-// CHECK-DAG: @_ZTV1B = {{.*}} constant { [3 x i8*] } { {{.*}} null, {{.*}} @_ZTI1B {{.*}} @_ZN1B1fEv
+// CHECK-DAG: @_ZTV1B = {{.*}} constant { [3 x ptr] } { {{.*}} null, {{.*}} @_ZTI1B, {{.*}} @_ZN1B1fEv
struct B {
// CHECK-DAG: define {{.*}} @_ZN1B1fEv
virtual constexpr void f() {}
@@ -19,7 +19,7 @@ struct CBase {
virtual constexpr void f(); // not key function
};
-// CHECK-DAG: @_ZTV1C = {{.*}} constant {{.*}} null, {{.*}} @_ZTI1C {{.*}} @_ZN1C1fEv
+// CHECK-DAG: @_ZTV1C = {{.*}} constant {{.*}} null, {{.*}} @_ZTI1C, {{.*}} @_ZN1C1fEv
struct C : CBase {
void f(); // key function
};
diff --git a/clang/test/CodeGenCXX/vtable-key-function-win-comdat.cpp b/clang/test/CodeGenCXX/vtable-key-function-win-comdat.cpp
index 0d8d49d7e5f26..dd4fd9f8754a8 100644
--- a/clang/test/CodeGenCXX/vtable-key-function-win-comdat.cpp
+++ b/clang/test/CodeGenCXX/vtable-key-function-win-comdat.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck %s
namespace std { class type_info; }
extern void use(const std::type_info &rtti);
@@ -20,6 +20,6 @@ inline void Test1a::foo() {}
// CHECK-NOT: $_ZTS6Test1a.1 = comdat any
// CHECK-NOT: $_ZTI6Test1a.1 = comdat any
-// CHECK: @_ZTV6Test1a = linkonce_odr dso_local unnamed_addr constant {{.*}} ({ i8*, i8* }* @_ZTI6Test1a to i8*)
+// CHECK: @_ZTV6Test1a = linkonce_odr dso_local unnamed_addr constant {{.*}} ptr @_ZTI6Test1a
// CHECK: @_ZTS6Test1a = linkonce_odr dso_local constant
-// CHECK: @_ZTI6Test1a = linkonce_odr dso_local constant {{.*}} [8 x i8]* @_ZTS6Test1a
+// CHECK: @_ZTI6Test1a = linkonce_odr dso_local constant {{.*}} ptr @_ZTS6Test1a
diff --git a/clang/test/CodeGenCXX/x86_64-arguments.cpp b/clang/test/CodeGenCXX/x86_64-arguments.cpp
index 02fc907651fc3..d153a556eefac 100644
--- a/clang/test/CodeGenCXX/x86_64-arguments.cpp
+++ b/clang/test/CodeGenCXX/x86_64-arguments.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
// Basic base class test.
struct f0_s0 { unsigned a; };
struct f0_s1 : public f0_s0 { void *b; };
-// CHECK-LABEL: define{{.*}} void @_Z2f05f0_s1(i32 %a0.coerce0, i8* %a0.coerce1)
+// CHECK-LABEL: define{{.*}} void @_Z2f05f0_s1(i32 %a0.coerce0, ptr %a0.coerce1)
void f0(f0_s1 a0) { }
// Check with two eight-bytes in base class.
@@ -34,17 +34,17 @@ s4_mfp f4_1(s4_mfp a) { return a; }
// A struct with <= one eightbyte before a member data pointer should still
// be allowed in registers.
-// CHECK-LABEL: define{{.*}} void @{{.*}}f_struct_with_mdp{{.*}}(i8* %a.coerce0, i64 %a.coerce1)
+// CHECK-LABEL: define{{.*}} void @{{.*}}f_struct_with_mdp{{.*}}(ptr %a.coerce0, i64 %a.coerce1)
struct struct_with_mdp { char *a; s4_mdp b; };
void f_struct_with_mdp(struct_with_mdp a) { (void)a; }
// A struct with anything before a member function will be too big and
// goes in memory.
-// CHECK-LABEL: define{{.*}} void @{{.*}}f_struct_with_mfp_0{{.*}}(%struct{{.*}} byval(%struct{{.*}}) align 8 %a)
+// CHECK-LABEL: define{{.*}} void @{{.*}}f_struct_with_mfp_0{{.*}}(ptr byval(%struct{{.*}}) align 8 %a)
struct struct_with_mfp_0 { char a; s4_mfp b; };
void f_struct_with_mfp_0(struct_with_mfp_0 a) { (void)a; }
-// CHECK-LABEL: define{{.*}} void @{{.*}}f_struct_with_mfp_1{{.*}}(%struct{{.*}} byval(%struct{{.*}}) align 8 %a)
+// CHECK-LABEL: define{{.*}} void @{{.*}}f_struct_with_mfp_1{{.*}}(ptr byval(%struct{{.*}}) align 8 %a)
struct struct_with_mfp_1 { void *a; s4_mfp b; };
void f_struct_with_mfp_1(struct_with_mfp_1 a) { (void)a; }
@@ -57,7 +57,7 @@ void AddKeyword(StringRef, int x);
void foo() {
// CHECK-LABEL: define{{.*}} void @_ZN6PR75233fooEv()
- // CHECK: call void @_ZN6PR752310AddKeywordENS_9StringRefEi(i8* {{.*}}, i32 4)
+ // CHECK: call void @_ZN6PR752310AddKeywordENS_9StringRefEi(ptr {{.*}}, i32 4)
AddKeyword(StringRef(), 4);
}
}
@@ -69,7 +69,7 @@ namespace PR7742 { // Also rdar://8250764
struct c2 : public s2 {};
- // CHECK-LABEL: define{{.*}} <2 x float> @_ZN6PR77423fooEPNS_2c2E(%"struct.PR7742::c2"* %P)
+ // CHECK-LABEL: define{{.*}} <2 x float> @_ZN6PR77423fooEPNS_2c2E(ptr %P)
c2 foo(c2 *P) {
return c2();
}
@@ -87,7 +87,7 @@ namespace PR5179 {
B1 b1;
};
- // CHECK-LABEL: define{{.*}} i8* @_ZN6PR51793barENS_2B2E(i32* %b2.coerce)
+ // CHECK-LABEL: define{{.*}} ptr @_ZN6PR51793barENS_2B2E(ptr %b2.coerce)
const void *bar(B2 b2) {
return b2.b1.pa;
}
@@ -143,16 +143,16 @@ namespace test7 {
// And a couple extra related tests:
A y(A, long double, long, long, StringRef) { return A(); }
- // CHECK: define{{.*}} void @_ZN5test71yENS_1AEellNS_9StringRefE({{.*}} i8*
+ // CHECK: define{{.*}} void @_ZN5test71yENS_1AEellNS_9StringRefE({{.*}} ptr
struct StringDouble {char * ptr; double d;};
A z(A, A, A, A, A, StringDouble) { return A(); }
A zz(A, A, A, A, StringDouble) { return A(); }
// CHECK: define{{.*}} void @_ZN5test71zENS_1AES0_S0_S0_S0_NS_12StringDoubleE({{.*}} byval({{.*}}) align 8 {{%.*}})
- // CHECK: define{{.*}} void @_ZN5test72zzENS_1AES0_S0_S0_NS_12StringDoubleE({{.*}} i8*
+ // CHECK: define{{.*}} void @_ZN5test72zzENS_1AES0_S0_S0_NS_12StringDoubleE({{.*}} ptr
}
namespace test8 {
- // CHECK: declare void @_ZN5test83fooENS_1BE(%"class.test8::B"* byval(%"class.test8::B") align 8)
+ // CHECK: declare void @_ZN5test83fooENS_1BE(ptr byval(%"class.test8::B") align 8)
class A {
char big[17];
};
@@ -173,25 +173,25 @@ namespace test9 {
struct T { void *data[2]; };
- // CHECK: define{{.*}} void @_ZN5test93fooEPNS_1SEPNS_1TE([[S:%.*]]* %0, [[T:%.*]]* %1)
+ // CHECK: define{{.*}} void @_ZN5test93fooEPNS_1SEPNS_1TE(ptr %0, ptr %1)
void foo(S*, T*) {}
- // CHECK: define{{.*}} void @_ZN5test91aEiiiiNS_1TEPv([[S]]* noalias sret([[S]]) align 8 {{%.*}}, i32 %0, i32 %1, i32 %2, i32 %3, [[T]]* byval([[T]]) align 8 %4, i8* %5)
+ // CHECK: define{{.*}} void @_ZN5test91aEiiiiNS_1TEPv(ptr noalias sret([[S:%.*]]) align 8 {{%.*}}, i32 %0, i32 %1, i32 %2, i32 %3, ptr byval([[T:%.*]]) align 8 %4, ptr %5)
S a(int, int, int, int, T, void*) {
return S();
}
- // CHECK: define{{.*}} [[S]]* @_ZN5test91bEPNS_1SEiiiiNS_1TEPv([[S]]* {{%.*}}, i32 %0, i32 %1, i32 %2, i32 %3, [[T:%.*]]* byval([[T]]) align 8 %4, i8* %5)
+ // CHECK: define{{.*}} ptr @_ZN5test91bEPNS_1SEiiiiNS_1TEPv(ptr {{%.*}}, i32 %0, i32 %1, i32 %2, i32 %3, ptr byval([[T]]) align 8 %4, ptr %5)
S* b(S* sret, int, int, int, int, T, void*) {
return sret;
}
- // CHECK: define{{.*}} void @_ZN5test91cEiiiNS_1TEPv([[S]]* noalias sret([[S]]) align 8 {{%.*}}, i32 %0, i32 %1, i32 %2, i8* {{%.*}}, i8* {{%.*}}, i8* %3)
+ // CHECK: define{{.*}} void @_ZN5test91cEiiiNS_1TEPv(ptr noalias sret([[S]]) align 8 {{%.*}}, i32 %0, i32 %1, i32 %2, ptr {{%.*}}, ptr {{%.*}}, ptr %3)
S c(int, int, int, T, void*) {
return S();
}
- // CHECK: define{{.*}} [[S]]* @_ZN5test91dEPNS_1SEiiiNS_1TEPv([[S]]* {{%.*}}, i32 %0, i32 %1, i32 %2, i8* {{%.*}}, i8* {{%.*}}, i8* %3)
+ // CHECK: define{{.*}} ptr @_ZN5test91dEPNS_1SEiiiNS_1TEPv(ptr {{%.*}}, i32 %0, i32 %1, i32 %2, ptr {{%.*}}, ptr {{%.*}}, ptr %3)
S* d(S* sret, int, int, int, T, void*) {
return sret;
}
@@ -207,7 +207,7 @@ struct BasePacked {
struct DerivedPacked : public BasePacked {
int three;
};
-// CHECK-LABEL: define{{.*}} i32 @_ZN6test1020FuncForDerivedPackedENS_13DerivedPackedE({{.*}}* byval({{.*}}) align 8
+// CHECK-LABEL: define{{.*}} i32 @_ZN6test1020FuncForDerivedPackedENS_13DerivedPackedE(ptr byval({{.*}}) align 8
int FuncForDerivedPacked(DerivedPacked d) {
return d.three;
}
More information about the cfe-commits
mailing list