r213386 - Mark C++ reference parameters as dereferenceable
Hal Finkel
hfinkel at anl.gov
Fri Jul 18 08:52:11 PDT 2014
Author: hfinkel
Date: Fri Jul 18 10:52:10 2014
New Revision: 213386
URL: http://llvm.org/viewvc/llvm-project?rev=213386&view=rev
Log:
Mark C++ reference parameters as dereferenceable
Because references must be initialized using some evaluated expression, they
must point to something, and a callee can assume the reference parameter is
dereferenceable. Taking advantage of a new attribute just added to LLVM, mark
them as such.
Because dereferenceability in addrspace(0) implies nonnull in the backend, we
don't need both attributes. However, we need to know the size of the object to
use the dereferenceable attribute, so for incomplete types we still emit only
nonnull.
Added:
cfe/trunk/test/CodeGenCXX/address-space-ref.cpp
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/test/CXX/except/except.spec/p14-ir.cpp
cfe/trunk/test/CodeGenCXX/blocks-cxx11.cpp
cfe/trunk/test/CodeGenCXX/blocks.cpp
cfe/trunk/test/CodeGenCXX/catch-undef-behavior.cpp
cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp
cfe/trunk/test/CodeGenCXX/const-init-cxx11.cpp
cfe/trunk/test/CodeGenCXX/constructor-direct-call.cpp
cfe/trunk/test/CodeGenCXX/constructor-init.cpp
cfe/trunk/test/CodeGenCXX/convert-to-fptr.cpp
cfe/trunk/test/CodeGenCXX/copy-assign-synthesis-1.cpp
cfe/trunk/test/CodeGenCXX/copy-constructor-elim-2.cpp
cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis.cpp
cfe/trunk/test/CodeGenCXX/cxx11-initializer-aggregate.cpp
cfe/trunk/test/CodeGenCXX/cxx11-thread-local-reference.cpp
cfe/trunk/test/CodeGenCXX/decl-ref-init.cpp
cfe/trunk/test/CodeGenCXX/default-arg-temps.cpp
cfe/trunk/test/CodeGenCXX/derived-to-base-conv.cpp
cfe/trunk/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp
cfe/trunk/test/CodeGenCXX/dllexport-members.cpp
cfe/trunk/test/CodeGenCXX/dllexport.cpp
cfe/trunk/test/CodeGenCXX/dllimport-members.cpp
cfe/trunk/test/CodeGenCXX/dllimport.cpp
cfe/trunk/test/CodeGenCXX/eh.cpp
cfe/trunk/test/CodeGenCXX/empty-nontrivially-copyable.cpp
cfe/trunk/test/CodeGenCXX/exceptions.cpp
cfe/trunk/test/CodeGenCXX/fastcall.cpp
cfe/trunk/test/CodeGenCXX/goto.cpp
cfe/trunk/test/CodeGenCXX/implicit-copy-assign-operator.cpp
cfe/trunk/test/CodeGenCXX/implicit-copy-constructor.cpp
cfe/trunk/test/CodeGenCXX/mangle-lambdas.cpp
cfe/trunk/test/CodeGenCXX/mangle.cpp
cfe/trunk/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
cfe/trunk/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
cfe/trunk/test/CodeGenCXX/nrvo.cpp
cfe/trunk/test/CodeGenCXX/pod-member-memcpys.cpp
cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp
cfe/trunk/test/CodeGenCXX/reference-cast.cpp
cfe/trunk/test/CodeGenCXX/rvalue-references.cpp
cfe/trunk/test/CodeGenCXX/temporaries.cpp
cfe/trunk/test/CodeGenCXX/throw-expressions.cpp
cfe/trunk/test/CodeGenCXX/volatile.cpp
cfe/trunk/test/CodeGenObjC/return-objc-object.mm
cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm
cfe/trunk/test/CodeGenObjCXX/arc-move.mm
cfe/trunk/test/CodeGenObjCXX/arc-special-member-functions.mm
cfe/trunk/test/CodeGenObjCXX/implicit-copy-assign-operator.mm
cfe/trunk/test/CodeGenObjCXX/implicit-copy-constructor.mm
cfe/trunk/test/CodeGenObjCXX/lvalue-reference-getter.mm
cfe/trunk/test/CodeGenObjCXX/message-reference.mm
cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm
cfe/trunk/test/CodeGenObjCXX/property-lvalue-capture.mm
cfe/trunk/test/CodeGenObjCXX/property-object-reference-2.mm
cfe/trunk/test/CodeGenObjCXX/property-objects.mm
cfe/trunk/test/CodeGenObjCXX/property-reference.mm
cfe/trunk/test/Modules/templates.mm
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Jul 18 10:52:10 2014
@@ -1202,8 +1202,14 @@ void CodeGenModule::ConstructAttributeLi
llvm_unreachable("Invalid ABI kind for return argument");
}
- if (RetTy->isReferenceType())
- RetAttrs.addAttribute(llvm::Attribute::NonNull);
+ if (const auto *RefTy = RetTy->getAs<ReferenceType>()) {
+ QualType PTy = RefTy->getPointeeType();
+ if (!PTy->isIncompleteType() && PTy->isConstantSizeType())
+ RetAttrs.addDereferenceableAttr(getContext().getTypeSizeInChars(PTy)
+ .getQuantity());
+ else if (getContext().getTargetAddressSpace(PTy) == 0)
+ RetAttrs.addAttribute(llvm::Attribute::NonNull);
+ }
if (RetAttrs.hasAttributes())
PAL.push_back(llvm::
@@ -1293,8 +1299,14 @@ void CodeGenModule::ConstructAttributeLi
}
}
- if (ParamType->isReferenceType())
- Attrs.addAttribute(llvm::Attribute::NonNull);
+ if (const auto *RefTy = ParamType->getAs<ReferenceType>()) {
+ QualType PTy = RefTy->getPointeeType();
+ if (!PTy->isIncompleteType() && PTy->isConstantSizeType())
+ Attrs.addDereferenceableAttr(getContext().getTypeSizeInChars(PTy)
+ .getQuantity());
+ else if (getContext().getTargetAddressSpace(PTy) == 0)
+ Attrs.addAttribute(llvm::Attribute::NonNull);
+ }
if (Attrs.hasAttributes())
PAL.push_back(llvm::AttributeSet::get(getLLVMContext(), Index, Attrs));
Modified: cfe/trunk/test/CXX/except/except.spec/p14-ir.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/except/except.spec/p14-ir.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CXX/except/except.spec/p14-ir.cpp (original)
+++ cfe/trunk/test/CXX/except/except.spec/p14-ir.cpp Fri Jul 18 10:52:10 2014
@@ -26,12 +26,12 @@ struct X4 {
struct X5 : X0, X4 { };
void test(X2 x2, X3 x3, X5 x5) {
- // CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X2* %this, %struct.X2* nonnull) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X2* %this, %struct.X2* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN2X2C2ERKS_({{.*}}) [[NUW:#[0-9]+]]
// CHECK-NEXT: ret void
// CHECK-NEXT: }
X2 x2a(x2);
- // CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X3* %this, %struct.X3* nonnull) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X3* %this, %struct.X3* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN2X3C2ERKS_({{.*}}) [[NUW]]
// CHECK-NEXT: ret void
// CHECK-NEXT: }
Added: cfe/trunk/test/CodeGenCXX/address-space-ref.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/address-space-ref.cpp?rev=213386&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/address-space-ref.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/address-space-ref.cpp Fri Jul 18 10:52:10 2014
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+
+// For a reference to a complete type, output the dereferenceable attribute (in
+// any address space).
+
+typedef int a __attribute__((address_space(1)));
+
+a & foo(a &x, a & y) {
+ return x;
+}
+
+// CHECK: define dereferenceable(4) i32 addrspace(1)* @_Z3fooRU3AS1iS0_(i32 addrspace(1)* dereferenceable(4) %x, i32 addrspace(1)* dereferenceable(4) %y)
+
+// For a reference to an incomplete type in an alternate address space, output
+// neither dereferenceable nor nonnull.
+
+class bc;
+typedef bc b __attribute__((address_space(1)));
+
+b & bar(b &x, b & y) {
+ return x;
+}
+
+// CHECK: define %class.bc addrspace(1)* @_Z3barRU3AS12bcS1_(%class.bc addrspace(1)* %x, %class.bc addrspace(1)* %y)
+
+// For a reference to an incomplete type in addrspace(0), output nonnull.
+
+bc & bar2(bc &x, bc & y) {
+ return x;
+}
+
+// CHECK: define nonnull %class.bc* @_Z4bar2R2bcS0_(%class.bc* nonnull %x, %class.bc* nonnull %y)
+
+
Modified: cfe/trunk/test/CodeGenCXX/blocks-cxx11.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/blocks-cxx11.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/blocks-cxx11.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/blocks-cxx11.cpp Fri Jul 18 10:52:10 2014
@@ -106,7 +106,7 @@ namespace test_block_in_lambda {
// CHECK: [[TO_DESTROY:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds [[LAMBDA_T]]* [[THIS]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN20test_block_in_lambda1AC1ERKS0_({{.*}}* [[T0]], {{.*}}* nonnull [[T1]])
+ // CHECK-NEXT: call void @_ZN20test_block_in_lambda1AC1ERKS0_({{.*}}* [[T0]], {{.*}}* dereferenceable({{[0-9]+}}) [[T1]])
// CHECK-NEXT: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
// CHECK-NEXT: call void @_ZN20test_block_in_lambda9takeBlockEU13block_pointerFvvE(void ()* [[T0]])
// CHECK-NEXT: call void @_ZN20test_block_in_lambda1AD1Ev({{.*}}* [[TO_DESTROY]])
Modified: cfe/trunk/test/CodeGenCXX/blocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/blocks.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/blocks.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/blocks.cpp Fri Jul 18 10:52:10 2014
@@ -164,7 +164,7 @@ namespace test5 {
// CHECK-NOT: br
// CHECK: [[CAPTURE:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
- // CHECK-NEXT: call void @_ZN5test51AC1ERKS0_([[A]]* [[CAPTURE]], [[A]]* nonnull [[X]])
+ // CHECK-NEXT: call void @_ZN5test51AC1ERKS0_([[A]]* [[CAPTURE]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
// CHECK-NEXT: store i1 true, i1* [[CLEANUP_ACTIVE]]
// CHECK-NEXT: bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
// CHECK-NEXT: br label
Modified: cfe/trunk/test/CodeGenCXX/catch-undef-behavior.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/catch-undef-behavior.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/catch-undef-behavior.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/catch-undef-behavior.cpp Fri Jul 18 10:52:10 2014
@@ -357,7 +357,7 @@ void downcast_pointer(B *b) {
// CHECK-NEXT: br i1 [[AND]]
}
-// CHECK-LABEL: define void @_Z18downcast_referenceR1B(%class.B* nonnull %b)
+// CHECK-LABEL: define void @_Z18downcast_referenceR1B(%class.B* dereferenceable({{[0-9]+}}) %b)
void downcast_reference(B &b) {
(void) static_cast<C&>(b);
// Alignment check from EmitTypeCheck(TCK_DowncastReference, ...)
Modified: cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/conditional-gnu-ext.cpp Fri Jul 18 10:52:10 2014
@@ -83,7 +83,7 @@ namespace test3 {
// CHECK-NEXT: [[T0:%.*]] = load [[B]]** [[X]]
// CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[T0]])
// CHECK-NEXT: br i1 [[BOOL]]
- // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* nonnull [[T0]])
+ // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* dereferenceable({{[0-9]+}}) [[T0]])
// CHECK-NEXT: br label
// CHECK: call void @_ZN5test31BC1Ev([[B]]* [[RESULT]])
// CHECK-NEXT: br label
@@ -97,7 +97,7 @@ namespace test3 {
// CHECK-NEXT: call void @_ZN5test312test1_helperEv([[B]]* sret [[TEMP]])
// CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[TEMP]])
// CHECK-NEXT: br i1 [[BOOL]]
- // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* nonnull [[TEMP]])
+ // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* dereferenceable({{[0-9]+}}) [[TEMP]])
// CHECK-NEXT: br label
// CHECK: call void @_ZN5test31BC1Ev([[B]]* [[RESULT]])
// CHECK-NEXT: br label
Modified: cfe/trunk/test/CodeGenCXX/const-init-cxx11.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/const-init-cxx11.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/const-init-cxx11.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/const-init-cxx11.cpp Fri Jul 18 10:52:10 2014
@@ -532,10 +532,10 @@ namespace InitFromConst {
// CHECK: call void @_ZN13InitFromConst7consumeIdEEvT_(double 4.300000e+00)
consume(d);
- // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* nonnull @_ZN13InitFromConstL1sE)
+ // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* dereferenceable({{[0-9]+}}) @_ZN13InitFromConstL1sE)
consume<const S&>(s);
- // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* nonnull @_ZN13InitFromConstL1sE)
+ // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* dereferenceable({{[0-9]+}}) @_ZN13InitFromConstL1sE)
consume<const S&>(r);
// CHECK: call void @_ZN13InitFromConst7consumeIPKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE)
Modified: cfe/trunk/test/CodeGenCXX/constructor-direct-call.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/constructor-direct-call.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/constructor-direct-call.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/constructor-direct-call.cpp Fri Jul 18 10:52:10 2014
@@ -54,6 +54,6 @@ void f3() {
// CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var)
var.Test3::Test3();
- // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(%class.Test3* %var, %class.Test3* nonnull %var2)
+ // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(%class.Test3* %var, %class.Test3* dereferenceable({{[0-9]+}}) %var2)
var.Test3::Test3(var2);
}
Modified: cfe/trunk/test/CodeGenCXX/constructor-init.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/constructor-init.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/constructor-init.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/constructor-init.cpp Fri Jul 18 10:52:10 2014
@@ -163,7 +163,7 @@ template<typename T> struct X;
// Make sure that the instantiated constructor initializes start and
// end properly.
-// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(%struct.X* %this, %struct.X* nonnull %other) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(%struct.X* %this, %struct.X* dereferenceable({{[0-9]+}}) %other) unnamed_addr
// CHECK: {{store.*null}}
// CHECK: {{store.*null}}
// CHECK: ret
Modified: cfe/trunk/test/CodeGenCXX/convert-to-fptr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/convert-to-fptr.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/convert-to-fptr.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/convert-to-fptr.cpp Fri Jul 18 10:52:10 2014
@@ -39,4 +39,4 @@ int main()
}
// CHECK: call i32 (i32)* (%struct.A*)* @_ZN1AcvPFiiEEv
-// CHECK: call nonnull i32 (i32)* (%struct.B*)* @_ZN1BcvRFiiEEv
+// CHECK: call i32 (i32)* (%struct.B*)* @_ZN1BcvRFiiEEv
Modified: cfe/trunk/test/CodeGenCXX/copy-assign-synthesis-1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/copy-assign-synthesis-1.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/copy-assign-synthesis-1.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/copy-assign-synthesis-1.cpp Fri Jul 18 10:52:10 2014
@@ -92,4 +92,4 @@ int main() {
dstY.pr();
}
-// CHECK: define linkonce_odr nonnull %struct.X* @_ZN1XaSERKS_
+// CHECK: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.X* @_ZN1XaSERKS_
Modified: cfe/trunk/test/CodeGenCXX/copy-constructor-elim-2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/copy-constructor-elim-2.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/copy-constructor-elim-2.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/copy-constructor-elim-2.cpp Fri Jul 18 10:52:10 2014
@@ -21,7 +21,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 %O) unnamed_addr
+ // CHECK: define {{.*}} @_ZN13no_elide_base7DerivedC1ERKNS_5OtherE(%"struct.no_elide_base::Derived"* returned %this, %"struct.no_elide_base::Other"* dereferenceable({{[0-9]+}}) %O) unnamed_addr
Derived::Derived(const Other &O)
// CHECK: call {{.*}} @_ZNK13no_elide_base5OthercvNS_4BaseEEv
// CHECK: call {{.*}} @_ZN13no_elide_base4BaseC2ERKS0_
Modified: cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis-2.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis-2.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis-2.cpp Fri Jul 18 10:52:10 2014
@@ -3,5 +3,5 @@
struct A { virtual void a(); };
A x(A& y) { return y; }
-// CHECK: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* {{.*}}%this, %struct.A* nonnull) unnamed_addr
+// CHECK: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* {{.*}}%this, %struct.A* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
Modified: cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/copy-constructor-synthesis.cpp Fri Jul 18 10:52:10 2014
@@ -21,7 +21,7 @@ struct P {
};
-// CHECK-LABEL: define linkonce_odr void @_ZN1XC1ERKS_(%struct.X* %this, %struct.X* nonnull) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1XC1ERKS_(%struct.X* %this, %struct.X* dereferenceable({{[0-9]+}})) unnamed_addr
struct X : M, N, P { // ...
X() : f1(1.0), d1(2.0), i1(3), name("HELLO"), bf1(0xff), bf2(0xabcd),
au_i1(1234), au1_4("MASKED") {}
@@ -136,7 +136,7 @@ void f(B b1) {
B b2 = b1;
}
-// CHECK: define linkonce_odr nonnull [[A:%.*]]* @_ZN12rdar138169401AaSERKS0_(
+// CHECK: define linkonce_odr dereferenceable({{[0-9]+}}) [[A:%.*]]* @_ZN12rdar138169401AaSERKS0_(
// CHECK: [[THIS:%.*]] = load [[A]]**
// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[A]]* [[THIS]], i32 0, i32 1
// CHECK-NEXT: [[OTHER:%.*]] = load [[A]]**
@@ -158,7 +158,7 @@ void f(B b1) {
// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
// CHECK-NEXT: ret void
-// CHECK-LABEL: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"* nonnull) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN6PR66281TC1Ev
// CHECK: call void @_ZN6PR66281TC1Ev
// CHECK: call void @_ZN6PR66281AC2ERKS0_RKNS_1TES5_
Modified: cfe/trunk/test/CodeGenCXX/cxx11-initializer-aggregate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx11-initializer-aggregate.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/cxx11-initializer-aggregate.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/cxx11-initializer-aggregate.cpp Fri Jul 18 10:52:10 2014
@@ -20,7 +20,7 @@ int &fn2(int &v) {
// CHECK: %[[INITLIST2:.*]] = alloca %struct.B, align 8
// CHECK: %[[R:.*]] = getelementptr inbounds %struct.B* %[[INITLIST2:.*]], i32 0, i32 0
// CHECK: store i32* %{{.*}}, i32** %[[R]], align 8
- // CHECK: call nonnull i32* @_ZN1B1fEv(%struct.B* %[[INITLIST2:.*]])
+ // CHECK: call dereferenceable({{[0-9]+}}) i32* @_ZN1B1fEv(%struct.B* %[[INITLIST2:.*]])
return B{v}.f();
}
Modified: cfe/trunk/test/CodeGenCXX/cxx11-thread-local-reference.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx11-thread-local-reference.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/cxx11-thread-local-reference.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/cxx11-thread-local-reference.cpp Fri Jul 18 10:52:10 2014
@@ -10,10 +10,10 @@ thread_local int &r = f();
int &g() { return r; }
// CHECK: define {{.*}} @[[R_INIT:.*]]()
-// CHECK: call nonnull i32* @_Z1fv()
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_Z1fv()
// CHECK: store i32* %{{.*}}, i32** @r, align 8
-// CHECK-LABEL: define nonnull i32* @_Z1gv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z1gv()
// CHECK: call i32* @_ZTW1r()
// CHECK: ret i32* %{{.*}}
Modified: cfe/trunk/test/CodeGenCXX/decl-ref-init.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/decl-ref-init.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/decl-ref-init.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/decl-ref-init.cpp Fri Jul 18 10:52:10 2014
@@ -23,5 +23,5 @@ int main() {
const A& rca2 = d();
}
-// CHECK: call nonnull %struct.A* @_ZN1BcvR1AEv
-// CHECK: call nonnull %struct.A* @_ZN1BcvR1AEv
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
Modified: cfe/trunk/test/CodeGenCXX/default-arg-temps.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/default-arg-temps.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/default-arg-temps.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/default-arg-temps.cpp Fri Jul 18 10:52:10 2014
@@ -16,12 +16,12 @@ public:
// CHECK-LABEL: define void @_Z1gv()
void g() {
// CHECK: call void @_ZN1TC1Ev([[T:%.*]]* [[AGG1:%.*]])
- // CHECK-NEXT: call void @_Z1fRK1T([[T]]* nonnull [[AGG1]])
+ // CHECK-NEXT: call void @_Z1fRK1T([[T]]* dereferenceable({{[0-9]+}}) [[AGG1]])
// CHECK-NEXT: call void @_ZN1TD1Ev([[T]]* [[AGG1]])
f();
// CHECK-NEXT: call void @_ZN1TC1Ev([[T:%.*]]* [[AGG2:%.*]])
- // CHECK-NEXT: call void @_Z1fRK1T([[T]]* nonnull [[AGG2]])
+ // CHECK-NEXT: call void @_Z1fRK1T([[T]]* dereferenceable({{[0-9]+}}) [[AGG2]])
// CHECK-NEXT: call void @_ZN1TD1Ev([[T]]* [[AGG2]])
f();
Modified: cfe/trunk/test/CodeGenCXX/derived-to-base-conv.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/derived-to-base-conv.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/derived-to-base-conv.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/derived-to-base-conv.cpp Fri Jul 18 10:52:10 2014
@@ -33,9 +33,9 @@ void test0(X x) {
test0_helper(x);
// CHECK-LABEL: define void @_Z5test01X(
// CHECK: [[TMP:%.*]] = alloca [[A:%.*]], align
- // CHECK-NEXT: [[T0:%.*]] = call nonnull [[B:%.*]]* @_ZN1XcvR1BEv(
+ // CHECK-NEXT: [[T0:%.*]] = call dereferenceable({{[0-9]+}}) [[B:%.*]]* @_ZN1XcvR1BEv(
// CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]* [[T0]] to [[A]]*
- // CHECK-NEXT: call void @_ZN1AC1ERKS_([[A]]* [[TMP]], [[A]]* nonnull [[T1]])
+ // CHECK-NEXT: call void @_ZN1AC1ERKS_([[A]]* [[TMP]], [[A]]* dereferenceable({{[0-9]+}}) [[T1]])
// CHECK-NEXT: call void @_Z12test0_helper1A([[A]]* [[TMP]])
// CHECK-NEXT: call void @_ZN1AD1Ev([[A]]* [[TMP]])
// CHECK-NEXT: ret void
Modified: cfe/trunk/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp Fri Jul 18 10:52:10 2014
@@ -9,7 +9,7 @@ struct D final : virtual C {
virtual void f();
};
-// CHECK-LABEL: define nonnull %struct.B* @_Z1fR1D
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.B* @_Z1fR1D
B &f(D &d) {
// CHECK-NOT: load i8**
return d;
Modified: cfe/trunk/test/CodeGenCXX/dllexport-members.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/dllexport-members.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllexport-members.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllexport-members.cpp Fri Jul 18 10:52:10 2014
@@ -288,32 +288,32 @@ struct ExportSpecials {
// G64-DAG: define dllexport void @_ZN14ExportSpecialsD2Ev(%struct.ExportSpecials* %this)
__declspec(dllexport) ~ExportSpecials();
- // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE at ABU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* nonnull)
- // M64-DAG: define dllexport %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA at AEBU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* nonnull)
- // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G64-DAG: define dllexport void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G64-DAG: define dllexport void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
+ // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE at ABU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA at AEBU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllexport) ExportSpecials(const ExportSpecials&);
- // M32-DAG: define dllexport x86_thiscallcc nonnull %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // M64-DAG: define dllexport nonnull %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G32-DAG: define dllexport x86_thiscallcc nonnull %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G64-DAG: define dllexport nonnull %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
+ // M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllexport) ExportSpecials& operator=(const ExportSpecials&);
- // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@$$QAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* nonnull)
- // M64-DAG: define dllexport %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* nonnull)
- // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G64-DAG: define dllexport void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G64-DAG: define dllexport void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
+ // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@$$QAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllexport) ExportSpecials(ExportSpecials&&);
- // M32-DAG: define dllexport x86_thiscallcc nonnull %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // M64-DAG: define dllexport nonnull %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G32-DAG: define dllexport x86_thiscallcc nonnull %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
- // G64-DAG: define dllexport nonnull %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* nonnull)
+ // M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllexport) ExportSpecials& operator=(ExportSpecials&&);
};
ExportSpecials::ExportSpecials() {}
@@ -344,10 +344,10 @@ struct ExportInlineSpecials {
// G64-DAG: define weak_odr dllexport void @_ZN20ExportInlineSpecialsC1ERKS_(
__declspec(dllexport) inline ExportInlineSpecials(const ExportInlineSpecials&);
- // M32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
- // M64-DAG: define weak_odr dllexport nonnull %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(
- // G32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
- // G64-DAG: define weak_odr dllexport nonnull %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
+ // M64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
+ // G64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
__declspec(dllexport) ExportInlineSpecials& operator=(const ExportInlineSpecials&);
// M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QAE@$$QAU0@@Z"(
@@ -356,10 +356,10 @@ struct ExportInlineSpecials {
// G64-DAG: define weak_odr dllexport void @_ZN20ExportInlineSpecialsC1EOS_(
__declspec(dllexport) ExportInlineSpecials(ExportInlineSpecials&&) {}
- // M32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
- // M64-DAG: define weak_odr dllexport nonnull %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(
- // G32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
- // G64-DAG: define weak_odr dllexport nonnull %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
+ // M64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
+ // G64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
__declspec(dllexport) ExportInlineSpecials& operator=(ExportInlineSpecials&&) { return *this; }
};
ExportInlineSpecials::ExportInlineSpecials(const ExportInlineSpecials&) {}
@@ -392,32 +392,32 @@ __declspec(dllexport) ExportDefaultedDef
// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsD2Ev(%struct.ExportDefaultedDefs* %this)
ExportDefaultedDefs::~ExportDefaultedDefs() = default;
-// M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE at ABU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* nonnull)
-// M64-DAG: define weak_odr dllexport %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA at AEBU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* nonnull)
-// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G64-DAG: define weak_odr dllexport void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G64-DAG: define weak_odr dllexport void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE at ABU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define weak_odr dllexport %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA at AEBU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define weak_odr dllexport void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define weak_odr dllexport void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs&) = default;
-// M32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// M64-DAG: define weak_odr dllexport nonnull %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G64-DAG: define weak_odr dllexport nonnull %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
inline ExportDefaultedDefs& ExportDefaultedDefs::operator=(const ExportDefaultedDefs&) = default;
-// M32-DAG: define dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* nonnull)
-// M64-DAG: define dllexport %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* nonnull)
-// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
+// M32-DAG: define dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define dllexport %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs&&) = default;
-// M32-DAG: define dllexport x86_thiscallcc nonnull %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// M64-DAG: define dllexport nonnull %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G32-DAG: define dllexport x86_thiscallcc nonnull %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
-// G64-DAG: define dllexport nonnull %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* nonnull)
+// M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
ExportDefaultedDefs& ExportDefaultedDefs::operator=(ExportDefaultedDefs&&) = default;
Modified: cfe/trunk/test/CodeGenCXX/dllexport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/dllexport.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllexport.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllexport.cpp Fri Jul 18 10:52:10 2014
@@ -489,7 +489,7 @@ struct S {
struct __declspec(dllexport) T {
// Copy assignment operator:
- // M32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.T* @"\01??4T@@QAEAAU0 at ABU0@@Z"
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0 at ABU0@@Z"
// Explicitly defaulted copy constructur:
T(const T&) = default;
@@ -511,7 +511,7 @@ int T::c;
template <typename T> struct __declspec(dllexport) U { void foo() {} };
// The U<int> specialization below must cause the following to be emitted:
// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?foo@?$U at H@@QAEXXZ"
-// M32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.U* @"\01??4?$U at H@@QAEAAU0 at ABU0@@Z"
+// M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.U* @"\01??4?$U at H@@QAEAAU0 at ABU0@@Z"
struct __declspec(dllexport) V : public U<int> { };
@@ -531,7 +531,7 @@ struct __declspec(dllexport) X : public
struct __declspec(dllexport) Y {
// Move assignment operator:
- // M32-DAG: define weak_odr dllexport x86_thiscallcc nonnull %struct.Y* @"\01??4Y@@QAEAAU0@$$QAU0@@Z"
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.Y* @"\01??4Y@@QAEAAU0@$$QAU0@@Z"
int x;
};
Modified: cfe/trunk/test/CodeGenCXX/dllimport-members.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/dllimport-members.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllimport-members.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllimport-members.cpp Fri Jul 18 10:52:10 2014
@@ -420,28 +420,28 @@ struct ImportSpecials {
// G64-DAG: declare dllimport void @_ZN14ImportSpecialsD1Ev(%struct.ImportSpecials*)
__declspec(dllimport) ~ImportSpecials();
- // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE at ABU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* nonnull)
- // M64-DAG: declare dllimport %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA at AEBU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE at ABU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA at AEBU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportSpecials(const ImportSpecials&);
- // M32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // M64-DAG: declare dllimport nonnull %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // G64-DAG: declare dllimport nonnull %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportSpecials& operator=(const ImportSpecials&);
- // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@$$QAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* nonnull)
- // M64-DAG: declare dllimport %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@$$QAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportSpecials(ImportSpecials&&);
- // M32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // M64-DAG: declare dllimport nonnull %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
- // G64-DAG: declare dllimport nonnull %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportSpecials& operator=(ImportSpecials&&);
};
USESPECIALS(ImportSpecials)
@@ -465,36 +465,36 @@ struct ImportInlineSpecials {
// GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(
__declspec(dllimport) ~ImportInlineSpecials() {}
- // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE at ABU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* nonnull)
- // M64-DAG: declare dllimport %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA at AEBU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE at ABU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA at AEBU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
// MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE at ABU0@@Z"(
// GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(
__declspec(dllimport) inline ImportInlineSpecials(const ImportInlineSpecials&);
- // M32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // M64-DAG: declare dllimport nonnull %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // G64-DAG: declare dllimport nonnull %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
- // GO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(
__declspec(dllimport) ImportInlineSpecials& operator=(const ImportInlineSpecials&);
- // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* nonnull)
- // M64-DAG: declare dllimport %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
// MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(
// GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(
__declspec(dllimport) ImportInlineSpecials(ImportInlineSpecials&&) {}
- // M32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // M64-DAG: declare dllimport nonnull %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // G64-DAG: declare dllimport nonnull %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* nonnull)
- // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
- // GO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(
__declspec(dllimport) ImportInlineSpecials& operator=(ImportInlineSpecials&&) { return *this; }
};
ImportInlineSpecials::ImportInlineSpecials(const ImportInlineSpecials&) {}
@@ -520,36 +520,36 @@ struct ImportDefaulted {
// GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* %this)
__declspec(dllimport) ~ImportDefaulted() = default;
- // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE at ABU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* nonnull)
- // M64-DAG: declare dllimport %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA at AEBU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // G64-DAG: declare dllimport void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE at ABU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* nonnull)
- // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE at ABU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA at AEBU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE at ABU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportDefaulted(const ImportDefaulted&) = default;
- // M32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // M64-DAG: declare dllimport nonnull %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // G64-DAG: declare dllimport nonnull %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* nonnull)
- // GO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportDefaulted& operator=(const ImportDefaulted&) = default;
- // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* nonnull)
- // M64-DAG: declare dllimport %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // G64-DAG: declare dllimport void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* nonnull)
- // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportDefaulted(ImportDefaulted&&) = default;
- // M32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // M64-DAG: declare dllimport nonnull %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // G32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // G64-DAG: declare dllimport nonnull %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* nonnull)
- // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* nonnull)
- // GO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* nonnull)
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
__declspec(dllimport) ImportDefaulted& operator=(ImportDefaulted&&) = default;
ForceNonTrivial v; // ensure special members are non-trivial
@@ -581,30 +581,30 @@ __declspec(dllimport) ImportDefaultedDef
// G64-DAG: declare dllimport void @_ZN19ImportDefaultedDefsD1Ev(%struct.ImportDefaultedDefs*)
__declspec(dllimport) ImportDefaultedDefs::~ImportDefaultedDefs() = default;
-// M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE at ABU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* nonnull)
-// M64-DAG: declare dllimport %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA at AEBU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* nonnull)
-// G32-DAG: declare dllimport x86_thiscallcc void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* nonnull)
-// G64-DAG: declare dllimport void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* nonnull)
+// M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE at ABU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: declare dllimport %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA at AEBU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: declare dllimport void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
inline ImportDefaultedDefs::ImportDefaultedDefs(const ImportDefaultedDefs&) = default;
-// M32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* nonnull)
-// M64-DAG: declare dllimport nonnull %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* nonnull)
-// G32-DAG: declare dllimport x86_thiscallcc nonnull %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* nonnull)
-// G64-DAG: declare dllimport nonnull %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* nonnull)
+// M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
inline ImportDefaultedDefs& ImportDefaultedDefs::operator=(const ImportDefaultedDefs&) = default;
-// M32-DAG: define x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* nonnull)
-// M64-DAG: define %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* nonnull)
-// G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
-// G64-DAG: define void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
-// G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
-// G64-DAG: define void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
+// M32-DAG: define x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
ImportDefaultedDefs::ImportDefaultedDefs(ImportDefaultedDefs&&) = default; // dllimport ignored
-// M32-DAG: define x86_thiscallcc nonnull %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
-// M64-DAG: define nonnull %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
-// G32-DAG: define x86_thiscallcc nonnull %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
-// G64-DAG: define nonnull %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* nonnull)
+// M32-DAG: define x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
ImportDefaultedDefs& ImportDefaultedDefs::operator=(ImportDefaultedDefs&&) = default; // dllimport ignored
USESPECIALS(ImportDefaultedDefs)
Modified: cfe/trunk/test/CodeGenCXX/dllimport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/dllimport.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllimport.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllimport.cpp Fri Jul 18 10:52:10 2014
@@ -539,11 +539,11 @@ struct __declspec(dllimport) T {
// MO1-DAG: @"\01?b at T@@2HA" = external dllimport global i32
T& operator=(T&) = default;
- // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull %struct.T* @"\01??4T@@QAEAAU0 at AAU0@@Z"
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0 at AAU0@@Z"
T& operator=(T&&) = default;
// Note: Don't mark inline move operators dllimport because current MSVC versions don't export them.
- // MO1-DAG: define linkonce_odr x86_thiscallcc nonnull %struct.T* @"\01??4T@@QAEAAU0@$$QAU0@@Z"
+ // MO1-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0@$$QAU0@@Z"
};
USEMEMFUNC(T, a)
USEVAR(T::b)
Modified: cfe/trunk/test/CodeGenCXX/eh.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/eh.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/eh.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/eh.cpp Fri Jul 18 10:52:10 2014
@@ -34,7 +34,7 @@ void test2() {
// CHECK-NEXT: [[SELECTORVAR:%.*]] = alloca i32
// CHECK-NEXT: [[EXNOBJ:%.*]] = call i8* @__cxa_allocate_exception(i64 16)
// CHECK-NEXT: [[EXN:%.*]] = bitcast i8* [[EXNOBJ]] to [[DSTAR:%[^*]*\*]]
-// CHECK-NEXT: invoke void @_ZN7test2_DC1ERKS_([[DSTAR]] [[EXN]], [[DSTAR]] nonnull @d2)
+// CHECK-NEXT: invoke void @_ZN7test2_DC1ERKS_([[DSTAR]] [[EXN]], [[DSTAR]] dereferenceable({{[0-9]+}}) @d2)
// CHECK-NEXT: to label %[[CONT:.*]] unwind label %{{.*}}
// : [[CONT]]: (can't check this in Release-Asserts builds)
// CHECK: call void @__cxa_throw(i8* [[EXNOBJ]], i8* bitcast ({{.*}}* @_ZTI7test2_D to i8*), i8* null) [[NR]]
@@ -428,7 +428,7 @@ namespace test16 {
// CHECK-NEXT: [[T0:%.*]] = bitcast i8* [[EXN]] to [[B:%.*]]*
// CHECK-NEXT: invoke void @_ZN6test161AC1Ev([[A]]* [[TEMP]])
// CHECK: store i1 true, i1* [[TEMP_ACTIVE]]
- // CHECK-NEXT: invoke void @_ZN6test161BC1ERKNS_1AE([[B]]* [[T0]], [[A]]* nonnull [[TEMP]])
+ // CHECK-NEXT: invoke void @_ZN6test161BC1ERKNS_1AE([[B]]* [[T0]], [[A]]* dereferenceable({{[0-9]+}}) [[TEMP]])
// CHECK: store i1 false, i1* [[EXN_ACTIVE]]
// CHECK-NEXT: invoke void @__cxa_throw(i8* [[EXN]],
Modified: cfe/trunk/test/CodeGenCXX/empty-nontrivially-copyable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/empty-nontrivially-copyable.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/empty-nontrivially-copyable.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/empty-nontrivially-copyable.cpp Fri Jul 18 10:52:10 2014
@@ -19,7 +19,7 @@ bool foo(Empty e) {
}
void caller(Empty &e) {
-// CHECK: @_Z6callerR5Empty(%struct.Empty* nonnull %e)
+// CHECK: @_Z6callerR5Empty(%struct.Empty* dereferenceable({{[0-9]+}}) %e)
// CHECK: call {{.*}} @_ZN5EmptyC1ERKS_(%struct.Empty* [[NEWTMP:%.*]], %struct.Empty*
// CHECK: call {{.*}} @_Z3foo5Empty(%struct.Empty* [[NEWTMP]])
foo(e);
Modified: cfe/trunk/test/CodeGenCXX/exceptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/exceptions.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/exceptions.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/exceptions.cpp Fri Jul 18 10:52:10 2014
@@ -279,7 +279,7 @@ namespace test5 {
// CHECK-NEXT: [[ADJ:%.*]] = call i8* @__cxa_get_exception_ptr(i8* [[EXN]])
// CHECK-NEXT: [[SRC:%.*]] = bitcast i8* [[ADJ]] to [[A_T]]*
// CHECK-NEXT: invoke void @_ZN5test51TC1Ev([[T_T]]* [[T]])
- // CHECK: invoke void @_ZN5test51AC1ERKS0_RKNS_1TE([[A_T]]* [[A]], [[A_T]]* nonnull [[SRC]], [[T_T]]* nonnull [[T]])
+ // CHECK: invoke void @_ZN5test51AC1ERKS0_RKNS_1TE([[A_T]]* [[A]], [[A_T]]* dereferenceable({{[0-9]+}}) [[SRC]], [[T_T]]* dereferenceable({{[0-9]+}}) [[T]])
// CHECK: invoke void @_ZN5test51TD1Ev([[T_T]]* [[T]])
// CHECK: call i8* @__cxa_begin_catch(i8* [[EXN]]) [[NUW]]
// CHECK-NEXT: invoke void @_ZN5test51AD1Ev([[A_T]]* [[A]])
Modified: cfe/trunk/test/CodeGenCXX/fastcall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/fastcall.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/fastcall.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/fastcall.cpp Fri Jul 18 10:52:10 2014
@@ -3,7 +3,7 @@
void __attribute__((fastcall)) foo1(int &y);
void bar1(int &y) {
// CHECK-LABEL: define void @_Z4bar1Ri
- // CHECK: call x86_fastcallcc void @_Z4foo1Ri(i32* inreg nonnull %
+ // CHECK: call x86_fastcallcc void @_Z4foo1Ri(i32* inreg dereferenceable({{[0-9]+}}) %
foo1(y);
}
Modified: cfe/trunk/test/CodeGenCXX/goto.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/goto.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/goto.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/goto.cpp Fri Jul 18 10:52:10 2014
@@ -22,7 +22,7 @@ namespace test0 {
// 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]]* nonnull [[TMP]])
+ // CHECK: invoke void @_ZN5test01VC1ERKNS_1AE([[V]]* [[NEWCAST]], [[A]]* dereferenceable({{[0-9]+}}) [[TMP]])
// CHECK: store i1 false, i1* [[CLEANUPACTIVE]]
// CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[TMP]])
A y;
Modified: cfe/trunk/test/CodeGenCXX/implicit-copy-assign-operator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/implicit-copy-assign-operator.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/implicit-copy-assign-operator.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/implicit-copy-assign-operator.cpp Fri Jul 18 10:52:10 2014
@@ -40,7 +40,7 @@ void test_D(D d1, D d2) {
d1 = d2;
}
-// CHECK-LABEL: define linkonce_odr nonnull %struct.D* @_ZN1DaSERS_
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.D* @_ZN1DaSERS_
// CHECK: {{call.*_ZN1AaSERS_}}
// CHECK: {{call.*_ZN1BaSERS_}}
// CHECK: {{call.*_ZN1CaSERKS_}}
Modified: cfe/trunk/test/CodeGenCXX/implicit-copy-constructor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/implicit-copy-constructor.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/implicit-copy-constructor.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/implicit-copy-constructor.cpp Fri Jul 18 10:52:10 2014
@@ -40,7 +40,7 @@ void f(D d) {
D d2(d);
}
-// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D* nonnull) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN1AC1Ev
// CHECK: call void @_ZN1CC2ERS_1A
// CHECK: call void @_ZN1AD1Ev
Modified: cfe/trunk/test/CodeGenCXX/mangle-lambdas.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-lambdas.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-lambdas.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-lambdas.cpp Fri Jul 18 10:52:10 2014
@@ -192,7 +192,7 @@ namespace PR12123 {
};
void B::h() { f(); }
}
-// CHECK-LABEL: define linkonce_odr nonnull %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
namespace PR12808 {
template <typename> struct B {
Modified: cfe/trunk/test/CodeGenCXX/mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle.cpp Fri Jul 18 10:52:10 2014
@@ -280,13 +280,13 @@ struct Ops {
void *v;
};
-// CHECK-LABEL: define nonnull %struct.Ops* @_ZN3OpsplERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsplERKS_
Ops& Ops::operator+(const Ops&) { return *this; }
-// CHECK-LABEL: define nonnull %struct.Ops* @_ZN3OpsmiERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmiERKS_
Ops& Ops::operator-(const Ops&) { return *this; }
-// CHECK-LABEL: define nonnull %struct.Ops* @_ZN3OpsanERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsanERKS_
Ops& Ops::operator&(const Ops&) { return *this; }
-// CHECK-LABEL: define nonnull %struct.Ops* @_ZN3OpsmlERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmlERKS_
Ops& Ops::operator*(const Ops&) { return *this; }
// PR5861
Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp Fri Jul 18 10:52:10 2014
@@ -137,10 +137,10 @@ void call_small_arg_with_dtor() {
// Test that references aren't destroyed in the callee.
void ref_small_arg_with_dtor(const SmallWithDtor &s) { }
-// WIN32: define void @"\01?ref_small_arg_with_dtor@@YAXABUSmallWithDtor@@@Z"(%struct.SmallWithDtor* nonnull %s) {{.*}} {
+// WIN32: define void @"\01?ref_small_arg_with_dtor@@YAXABUSmallWithDtor@@@Z"(%struct.SmallWithDtor* dereferenceable({{[0-9]+}}) %s) {{.*}} {
// WIN32-NOT: call x86_thiscallcc void @"\01??1SmallWithDtor@@QAE at XZ"
// WIN32: }
-// WIN64-LABEL: define void @"\01?ref_small_arg_with_dtor@@YAXAEBUSmallWithDtor@@@Z"(%struct.SmallWithDtor* nonnull %s)
+// WIN64-LABEL: define void @"\01?ref_small_arg_with_dtor@@YAXAEBUSmallWithDtor@@@Z"(%struct.SmallWithDtor* dereferenceable({{[0-9]+}}) %s)
void big_arg_with_dtor(BigWithDtor s) {}
// WIN64-LABEL: define void @"\01?big_arg_with_dtor@@YAXUBigWithDtor@@@Z"(%struct.BigWithDtor* %s)
Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-static-initializers.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/microsoft-abi-static-initializers.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/microsoft-abi-static-initializers.cpp Fri Jul 18 10:52:10 2014
@@ -119,7 +119,7 @@ inline S &UnreachableStatic() {
return s;
}
-// CHECK-LABEL: define linkonce_odr nonnull %struct.S* @"\01?UnreachableStatic@@YAAAUS@@XZ"()
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.S* @"\01?UnreachableStatic@@YAAAUS@@XZ"()
// CHECK: and i32 {{.*}}, 2
// CHECK: or i32 {{.*}}, 2
// CHECK: ret
@@ -129,7 +129,7 @@ inline S &getS() {
return TheS;
}
-// CHECK-LABEL: define linkonce_odr nonnull %struct.S* @"\01?getS@@YAAAUS@@XZ"
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.S* @"\01?getS@@YAAAUS@@XZ"
// CHECK: load i32* @"\01??_B?1??getS@@YAAAUS@@XZ at 51"
// CHECK: and i32 {{.*}}, 1
// CHECK: icmp ne i32 {{.*}}, 0
Modified: cfe/trunk/test/CodeGenCXX/nrvo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/nrvo.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/nrvo.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/nrvo.cpp Fri Jul 18 10:52:10 2014
@@ -169,7 +169,7 @@ X test6() {
return a;
// CHECK: [[A:%.*]] = alloca [[X:%.*]], align 8
// CHECK-NEXT: call {{.*}} @_ZN1XC1Ev([[X]]* [[A]])
- // CHECK-NEXT: call {{.*}} @_ZN1XC1ERKS_([[X]]* {{%.*}}, [[X]]* nonnull [[A]])
+ // CHECK-NEXT: call {{.*}} @_ZN1XC1ERKS_([[X]]* {{%.*}}, [[X]]* dereferenceable({{[0-9]+}}) [[A]])
// CHECK-NEXT: call {{.*}} @_ZN1XD1Ev([[X]]* [[A]])
// CHECK-NEXT: ret void
}
Modified: cfe/trunk/test/CodeGenCXX/pod-member-memcpys.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/pod-member-memcpys.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/pod-member-memcpys.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/pod-member-memcpys.cpp Fri Jul 18 10:52:10 2014
@@ -108,59 +108,59 @@ CALL_AO(InnerClassMember)
CALL_AO(PackedMembers)
// Basic copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* %this, %struct.Basic* nonnull)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.Basic*
// PODMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* %this, %struct.PODMember* nonnull)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.PODMember*
// PODLikeMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* nonnull)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.PODLikeMember*
// ArrayMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* nonnull)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: ret %struct.ArrayMember*
// VolatileMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* nonnull)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: load volatile i32* {{.*}}, align 4
// CHECK: store volatile i32 {{.*}}, align 4
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.VolatileMember*
// BitfieldMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* nonnull)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
// CHECK: ret %struct.BitfieldMember*
// InnerClass copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* nonnull)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.InnerClassMember*
// PackedMembers copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* nonnull)
-// CHECK: call nonnull %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}}))
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
// CHECK: ret %struct.PackedMembers*
@@ -184,21 +184,21 @@ CALL_CC(PODMember)
CALL_CC(Basic)
// Basic copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// PODMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// PODLikeMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: invoke void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
@@ -207,14 +207,14 @@ CALL_CC(Basic)
// CHECK: invoke void @_ZN7PODLikeD1Ev
// ArrayMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: ret void
// VolatileMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: load volatile i32* {{.*}}, align 4
// CHECK: store volatile i32 {{.*}}, align 4
@@ -223,34 +223,34 @@ CALL_CC(Basic)
// CHECK: ret void
// BitfieldMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
// CHECK: ret void
// InnerClass copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// ReferenceMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: ret void
// BitfieldMember2 copy-constructor:
-// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2* nonnull)
+// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2* dereferenceable({{[0-9]+}}))
// CHECK-2: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4, i1 false)
// CHECK-2: call void @_ZN6NonPODC1ERKS_
// CHECK-2: ret void
// PackedMembers copy-assignment:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* nonnull)
+// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}}))
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
// CHECK: ret void
Modified: cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp Fri Jul 18 10:52:10 2014
@@ -202,7 +202,7 @@ namespace BoolPtrToMember {
bool member;
};
- // CHECK-LABEL: define nonnull i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
+ // CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
bool &f(X &x, bool X::*member) {
// CHECK: {{bitcast.* to i8\*}}
// CHECK-NEXT: getelementptr inbounds i8*
Modified: cfe/trunk/test/CodeGenCXX/reference-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/reference-cast.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/reference-cast.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/reference-cast.cpp Fri Jul 18 10:52:10 2014
@@ -3,7 +3,7 @@
// PR6024
extern int i;
-// CHECK: define nonnull i32* @_Z16lvalue_noop_castv() [[NUW:#[0-9]+]]
+// CHECK: define dereferenceable({{[0-9]+}}) i32* @_Z16lvalue_noop_castv() [[NUW:#[0-9]+]]
const int &lvalue_noop_cast() {
if (i == 0)
// CHECK: store i32 17, i32*
@@ -15,7 +15,7 @@ const int &lvalue_noop_cast() {
return 17;
}
-// CHECK-LABEL: define nonnull i16* @_Z20lvalue_integral_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i16* @_Z20lvalue_integral_castv()
const short &lvalue_integral_cast() {
if (i == 0)
// CHECK: store i16 17, i16*
@@ -27,7 +27,7 @@ const short &lvalue_integral_cast() {
return 17;
}
-// CHECK-LABEL: define nonnull i16* @_Z29lvalue_floating_integral_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i16* @_Z29lvalue_floating_integral_castv()
const short &lvalue_floating_integral_cast() {
if (i == 0)
// CHECK: store i16 17, i16*
@@ -39,7 +39,7 @@ const short &lvalue_floating_integral_ca
return 17.5;
}
-// CHECK-LABEL: define nonnull float* @_Z29lvalue_integral_floating_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) float* @_Z29lvalue_integral_floating_castv()
const float &lvalue_integral_floating_cast() {
if (i == 0)
// CHECK: store float 1.700000e+{{0*}}1, float*
@@ -51,7 +51,7 @@ const float &lvalue_integral_floating_ca
return 17;
}
-// CHECK-LABEL: define nonnull float* @_Z20lvalue_floating_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) float* @_Z20lvalue_floating_castv()
const float &lvalue_floating_cast() {
if (i == 0)
// CHECK: store float 1.700000e+{{0*}}1, float*
@@ -65,7 +65,7 @@ const float &lvalue_floating_cast() {
int get_int();
-// CHECK-LABEL: define nonnull i8* @_Z24lvalue_integer_bool_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z24lvalue_integer_bool_castv()
const bool &lvalue_integer_bool_cast() {
if (i == 0)
// CHECK: call i32 @_Z7get_intv()
@@ -82,7 +82,7 @@ const bool &lvalue_integer_bool_cast() {
float get_float();
-// CHECK-LABEL: define nonnull i8* @_Z25lvalue_floating_bool_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z25lvalue_floating_bool_castv()
const bool &lvalue_floating_bool_cast() {
if (i == 0)
// CHECK: call float @_Z9get_floatv()
@@ -107,7 +107,7 @@ typedef int (X::*pmf)(int);
pm get_pointer_to_member_data();
pmf get_pointer_to_member_function();
-// CHECK-LABEL: define nonnull i8* @_Z26lvalue_ptrmem_to_bool_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z26lvalue_ptrmem_to_bool_castv()
const bool &lvalue_ptrmem_to_bool_cast() {
if (i == 0)
// CHECK: call i64 @_Z26get_pointer_to_member_datav()
@@ -125,7 +125,7 @@ const bool &lvalue_ptrmem_to_bool_cast()
return get_pointer_to_member_data();
}
-// CHECK-LABEL: define nonnull i8* @_Z27lvalue_ptrmem_to_bool_cast2v
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z27lvalue_ptrmem_to_bool_cast2v
const bool &lvalue_ptrmem_to_bool_cast2() {
if (i == 0)
// CHECK: {{call.*_Z30get_pointer_to_member_functionv}}
Modified: cfe/trunk/test/CodeGenCXX/rvalue-references.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/rvalue-references.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/rvalue-references.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/rvalue-references.cpp Fri Jul 18 10:52:10 2014
@@ -7,8 +7,8 @@ struct B : Spacer, A { };
B &getB();
-// CHECK-LABEL: define nonnull %struct.A* @_Z4getAv()
-// CHECK: call nonnull %struct.B* @_Z4getBv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.A* @_Z4getAv()
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.B* @_Z4getBv()
// CHECK-NEXT: bitcast %struct.B*
// CHECK-NEXT: getelementptr inbounds i8*
// CHECK-NEXT: bitcast i8* {{.*}} to %struct.A*
@@ -19,17 +19,17 @@ int &getIntLValue();
int &&getIntXValue();
int getIntPRValue();
-// CHECK-LABEL: define nonnull i32* @_Z2f0v()
-// CHECK: call nonnull i32* @_Z12getIntLValuev()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z2f0v()
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_Z12getIntLValuev()
// CHECK-NEXT: ret i32*
int &&f0() { return static_cast<int&&>(getIntLValue()); }
-// CHECK-LABEL: define nonnull i32* @_Z2f1v()
-// CHECK: call nonnull i32* @_Z12getIntXValuev()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z2f1v()
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_Z12getIntXValuev()
// CHECK-NEXT: ret i32*
int &&f1() { return static_cast<int&&>(getIntXValue()); }
-// CHECK-LABEL: define nonnull i32* @_Z2f2v
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z2f2v
// CHECK: call i32 @_Z13getIntPRValuev()
// CHECK-NEXT: store i32 {{.*}}, i32*
// CHECK-NEXT: ret i32*
@@ -95,7 +95,7 @@ namespace test1 {
};
// CHECK-LABEL: define void @_ZN5test11BC2Ei(
- // CHECK: [[T0:%.*]] = call nonnull i32* @_ZN5test14moveERi(
+ // CHECK: [[T0:%.*]] = call dereferenceable({{[0-9]+}}) i32* @_ZN5test14moveERi(
// CHECK-NEXT: [[T1:%.*]] = load i32* [[T0]]
// CHECK-NEXT: call void @_ZN5test11AC1Ei({{.*}}, i32 [[T1]])
// CHECK-NEXT: ret void
Modified: cfe/trunk/test/CodeGenCXX/temporaries.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/temporaries.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/temporaries.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/temporaries.cpp Fri Jul 18 10:52:10 2014
@@ -325,7 +325,7 @@ int& f(int);
void g() {
// CHECK: call void @_ZN3T121AC1Ev
// CHECK-NEXT: call i32 @_ZN3T121A1fEv(
- // CHECK-NEXT: call nonnull i32* @_ZN3T121fEi(
+ // CHECK-NEXT: call dereferenceable({{[0-9]+}}) i32* @_ZN3T121fEi(
// CHECK-NEXT: call void @_ZN3T121AD1Ev(
int& i = f(A().f());
}
@@ -427,10 +427,10 @@ namespace Elision {
// CHECK-NEXT: [[J:%.*]] = alloca [[A]], align 8
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[I]])
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[I]], [[A]]* nonnull [[X:%.*]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[I]], [[A]]* dereferenceable({{[0-9]+}}) [[X:%.*]])
A i = (c ? A() : x);
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[J]], [[A]]* nonnull [[X]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[J]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[J]])
A j = (c ? x : A());
@@ -450,10 +450,10 @@ namespace Elision {
A test3(int v, A x) {
if (v < 5)
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[RET:%.*]])
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* nonnull [[X:%.*]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* dereferenceable({{[0-9]+}}) [[X:%.*]])
return (v < 0 ? A() : x);
else
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* nonnull [[X]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[RET]])
return (v > 10 ? x : A());
@@ -471,7 +471,7 @@ namespace Elision {
// CHECK-NEXT: [[XS0:%.*]] = getelementptr inbounds [2 x [[A]]]* [[XS]], i64 0, i64 0
// CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* [[XS0]])
// CHECK-NEXT: [[XS1:%.*]] = getelementptr inbounds [[A]]* [[XS0]], i64 1
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[XS1]], [[A]]* nonnull [[X]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[XS1]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
A xs[] = { A(), x };
// CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [2 x [[A]]]* [[XS]], i32 0, i32 0
@@ -498,7 +498,7 @@ namespace Elision {
// CHECK: call void @_ZN7Elision1BC1Ev([[B]]* [[BT0]])
// CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]]* [[BT0]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[AT0]], [[A]]* nonnull [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[AT0]], [[A]]* dereferenceable({{[0-9]+}}) [[AM]])
// CHECK-NEXT: call void @_ZN7Elision5takeAENS_1AE([[A]]* [[AT0]])
// CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* [[AT0]])
// CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* [[BT0]])
@@ -506,13 +506,13 @@ namespace Elision {
// CHECK-NEXT: call void @_ZN7Elision1BC1Ev([[B]]* [[BT1]])
// CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]]* [[BT1]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[X]], [[A]]* nonnull [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[X]], [[A]]* dereferenceable({{[0-9]+}}) [[AM]])
// CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* [[BT1]])
A x = B().a;
// CHECK-NEXT: call void @_ZN7Elision1BC1Ev([[B]]* [[BT2]])
// CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]]* [[BT2]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET:%.*]], [[A]]* nonnull [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET:%.*]], [[A]]* dereferenceable({{[0-9]+}}) [[AM]])
// CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* [[BT2]])
return B().a;
Modified: cfe/trunk/test/CodeGenCXX/throw-expressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/throw-expressions.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/throw-expressions.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/throw-expressions.cpp Fri Jul 18 10:52:10 2014
@@ -97,7 +97,7 @@ void test7(bool cond) {
cond ? throw test7 : val;
}
-// CHECK-LABEL: define nonnull i32* @_Z5test8b(
+// CHECK-LABEL: define dereferenceable(4) i32* @_Z5test8b(
int &test8(bool cond) {
// CHECK: br i1
//
Modified: cfe/trunk/test/CodeGenCXX/volatile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/volatile.cpp?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/volatile.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/volatile.cpp Fri Jul 18 10:52:10 2014
@@ -15,7 +15,7 @@ namespace test0 {
void test(A t) {
// CHECK: [[ARR:%.*]] = load [[A:%.*]]** @_ZN5test05arrayE, align 8
// CHECK-NEXT: [[IDX:%.*]] = getelementptr inbounds [[A]]* [[ARR]], i64 0
- // CHECK-NEXT: [[TMP:%.*]] = call nonnull [[A]]* @_ZNV5test01AaSERVKS0_([[A]]* [[IDX]], [[A]]* nonnull [[T:%.*]])
+ // CHECK-NEXT: [[TMP:%.*]] = call dereferenceable({{[0-9]+}}) [[A]]* @_ZNV5test01AaSERVKS0_([[A]]* [[IDX]], [[A]]* dereferenceable({{[0-9]+}}) [[T:%.*]])
// CHECK-NEXT: ret void
array[0] = t;
}
Modified: cfe/trunk/test/CodeGenObjC/return-objc-object.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/return-objc-object.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/return-objc-object.mm (original)
+++ cfe/trunk/test/CodeGenObjC/return-objc-object.mm Fri Jul 18 10:52:10 2014
@@ -15,5 +15,5 @@ void call_once() {
f();
f1();
}
-// CHECK: call nonnull %0* @_Z1fv()
-// CHECK: call nonnull %0* @_Z2f1v()
+// CHECK: call dereferenceable({{[0-9]+}}) %0* @_Z1fv()
+// CHECK: call dereferenceable({{[0-9]+}}) %0* @_Z2f1v()
Modified: cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm Fri Jul 18 10:52:10 2014
@@ -38,7 +38,7 @@ namespace test0 {
// CHECK-NEXT: load
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* {{.*}} to [[BYREF_A]]*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[BYREF_A]]* [[T2]], i32 0, i32 7
- // CHECK-NEXT: call void @_ZN5test01AC1ERKS0_([[A]]* [[T1]], [[A]]* nonnull [[T3]])
+ // CHECK-NEXT: call void @_ZN5test01AC1ERKS0_([[A]]* [[T1]], [[A]]* dereferenceable({{[0-9]+}}) [[T3]])
// CHECK-NEXT: ret void
// CHECK: define internal void [[DISPOSE_HELPER]](
Modified: cfe/trunk/test/CodeGenObjCXX/arc-move.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-move.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/arc-move.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/arc-move.mm Fri Jul 18 10:52:10 2014
@@ -33,7 +33,7 @@ typename remove_reference<T>::type&& mov
// CHECK-LABEL: define void @_Z12library_moveRU8__strongP11objc_objectS2_
void library_move(__strong id &x, __strong id &y) {
- // CHECK: call nonnull i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
+ // CHECK: call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
// CHECK: load i8**
// CHECK: store i8* null, i8**
// CHECK: load i8***
@@ -46,7 +46,7 @@ void library_move(__strong id &x, __stro
// CHECK-LABEL: define void @_Z12library_moveRU8__strongP11objc_object
void library_move(__strong id &y) {
- // CHECK: [[Y:%[a-zA-Z0-9]+]] = call nonnull i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
+ // CHECK: [[Y:%[a-zA-Z0-9]+]] = call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
// Load the object
// CHECK-NEXT: [[OBJ:%[a-zA-Z0-9]+]] = load i8** [[Y]]
// Null out y
@@ -65,7 +65,7 @@ void library_move(__strong id &y) {
// CHECK-LABEL: define void @_Z10const_moveRKU8__strongP11objc_object(
void const_move(const __strong id &x) {
// CHECK: [[Y:%.*]] = alloca i8*,
- // CHECK: [[X:%.*]] = call nonnull i8** @_Z4moveIRKU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_(
+ // CHECK: [[X:%.*]] = call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRKU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_(
// CHECK-NEXT: [[T0:%.*]] = load i8** [[X]]
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]]
Modified: cfe/trunk/test/CodeGenObjCXX/arc-special-member-functions.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-special-member-functions.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/arc-special-member-functions.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/arc-special-member-functions.mm Fri Jul 18 10:52:10 2014
@@ -91,7 +91,7 @@ void test_ObjCBlockMember_copy_assign(Ob
}
// Implicitly-generated copy assignment operator for ObjCBlockMember
-// CHECK: define linkonce_odr nonnull {{%.*}}* @_ZN15ObjCBlockMemberaSERKS_(
+// CHECK: define linkonce_odr dereferenceable({{[0-9]+}}) {{%.*}}* @_ZN15ObjCBlockMemberaSERKS_(
// CHECK: [[T0:%.*]] = getelementptr inbounds [[T:%.*]]* {{%.*}}, i32 0, i32 0
// CHECK-NEXT: [[T1:%.*]] = load i32 (i32)** [[T0]], align 8
// CHECK-NEXT: [[T2:%.*]] = bitcast i32 (i32)* [[T1]] to i8*
Modified: cfe/trunk/test/CodeGenObjCXX/implicit-copy-assign-operator.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/implicit-copy-assign-operator.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/implicit-copy-assign-operator.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/implicit-copy-assign-operator.mm Fri Jul 18 10:52:10 2014
@@ -43,7 +43,7 @@ void test_D(D d1, D d2) {
d1 = d2;
}
-// CHECK-OBJ-LABEL: define linkonce_odr nonnull %struct.D* @_ZN1DaSERS_
+// CHECK-OBJ-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.D* @_ZN1DaSERS_
// CHECK-OBJ: {{call.*_ZN1AaSERS_}}
// CHECK-OBJ: {{call.*_ZN1BaSERS_}}
// CHECK-OBJ: {{call.*_ZN1CaSERKS_}}
Modified: cfe/trunk/test/CodeGenObjCXX/implicit-copy-constructor.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/implicit-copy-constructor.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/implicit-copy-constructor.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/implicit-copy-constructor.mm Fri Jul 18 10:52:10 2014
@@ -41,7 +41,7 @@ void f(D d) {
D d2(d);
}
-// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D* nonnull) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN1AC1Ev
// CHECK: call void @_ZN1CC2ERS_1A
// CHECK: call void @_ZN1AD1Ev
Modified: cfe/trunk/test/CodeGenObjCXX/lvalue-reference-getter.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/lvalue-reference-getter.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/lvalue-reference-getter.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/lvalue-reference-getter.mm Fri Jul 18 10:52:10 2014
@@ -24,5 +24,5 @@ static SetSection gSetSection;
// CHECK: [[SELF:%.*]] = alloca [[T6:%.*]]*, align
// CHECK: [[T0:%.*]] = load {{.*}}* [[SELF]], align
// CHECK: [[T1:%.*]] = load {{.*}}* @"\01L_OBJC_SELECTOR_REFERENCES_"
-// CHECK: [[C:%.*]] = call nonnull %struct.SetSection* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK: call nonnull i32* @_ZN10SetSection2atEi(%struct.SetSection* [[C]]
+// CHECK: [[C:%.*]] = call dereferenceable({{[0-9]+}}) %struct.SetSection* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_ZN10SetSection2atEi(%struct.SetSection* [[C]]
Modified: cfe/trunk/test/CodeGenObjCXX/message-reference.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/message-reference.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/message-reference.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/message-reference.mm Fri Jul 18 10:52:10 2014
@@ -15,6 +15,6 @@
}
@end
-// CHECK: [[T:%.*]] = call nonnull i32* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: [[T:%.*]] = call dereferenceable({{[0-9]+}}) i32* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: [[U:%.*]] = load i32* [[T]]
// CHECK [[V:%.*]] = icmp eq i32 [[U]], 0
Modified: cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm Fri Jul 18 10:52:10 2014
@@ -11,7 +11,7 @@ void GetURL() const;
@implementation TNodeIconAndNameCell
- (const TFENode&) node {
-// CHECK: call nonnull %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: call void @_ZNK7TFENode6GetURLEv(%struct.TFENode* %{{.*}})
self.node.GetURL();
} // expected-warning {{control reaches end of non-void function}}
@@ -27,12 +27,12 @@ void f0(const X &parent);
- (const X&) target;
@end
void f1(A *a) {
-// CHECK: [[PRP:%.*]] = call nonnull %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* nonnull [[PRP]])
+// CHECK: [[PRP:%.*]] = call dereferenceable({{[0-9]+}}) %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* dereferenceable({{[0-9]+}}) [[PRP]])
f0(a.target);
-// CHECK: [[MSG:%.*]] = call nonnull %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* nonnull [[MSG]])
+// CHECK: [[MSG:%.*]] = call dereferenceable({{[0-9]+}}) %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* dereferenceable({{[0-9]+}}) [[MSG]])
f0([a target]);
}
Modified: cfe/trunk/test/CodeGenObjCXX/property-lvalue-capture.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-lvalue-capture.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-lvalue-capture.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-lvalue-capture.mm Fri Jul 18 10:52:10 2014
@@ -49,5 +49,5 @@ void test(C *c, const A &a) {
// CHECK: [[ONE1:%.*]] = load %struct.A** [[AADDR:%.*]], align 8
// CHECK: [[TWO1:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_5", !invariant.load ![[MD_NUM]]
// CHECK: [[THREE1:%.*]] = bitcast [[TWOT:%.*]]* [[ZERO1:%.*]] to i8*
-// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.A*)*)(i8* [[THREE1]], i8* [[TWO1]], %struct.A* nonnull [[ONE1]])
+// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.A*)*)(i8* [[THREE1]], i8* [[TWO1]], %struct.A* dereferenceable({{[0-9]+}}) [[ONE1]])
// CHECK: store %struct.A* [[ONE1]], %struct.A** [[RESULT:%.*]], align 8
Modified: cfe/trunk/test/CodeGenObjCXX/property-object-reference-2.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-object-reference-2.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-object-reference-2.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-object-reference-2.mm Fri Jul 18 10:52:10 2014
@@ -33,7 +33,7 @@ struct TCPPObject
// CHECK: [[TWO:%.*]] = load %struct.TCPPObject** [[ADDR:%.*]], align 8
// CHECK: [[THREE:%.*]] = load %struct.TCPPObject** [[ADDR1:%.*]], align 8
// CHECK: [[CALL:%.*]] = call i32 @_Z7DEFAULTv()
-// CHECK: call void @_ZN10TCPPObjectC1ERKS_i(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* nonnull [[THREE]], i32 [[CALL]])
+// CHECK: call void @_ZN10TCPPObjectC1ERKS_i(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* dereferenceable({{[0-9]+}}) [[THREE]], i32 [[CALL]])
// CHECK: ret void
// CHECK: define internal void @"\01-[MyDocument MyProperty]"(
@@ -46,7 +46,7 @@ struct TCPPObject
// CHECK-LABEL: define internal void @__assign_helper_atomic_property_(
// CHECK: [[TWO:%.*]] = load %struct.TCPPObject** [[ADDR:%.*]], align 8
// CHECK: [[THREE:%.*]] = load %struct.TCPPObject** [[ADDR1:%.*]], align 8
-// CHECK: [[CALL:%.*]] = call nonnull %struct.TCPPObject* @_ZN10TCPPObjectaSERKS_(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* nonnull [[THREE]])
+// CHECK: [[CALL:%.*]] = call dereferenceable({{[0-9]+}}) %struct.TCPPObject* @_ZN10TCPPObjectaSERKS_(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* dereferenceable({{[0-9]+}}) [[THREE]])
// CHECK: ret void
// CHECK: define internal void @"\01-[MyDocument setMyProperty:]"(
Modified: cfe/trunk/test/CodeGenObjCXX/property-objects.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-objects.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-objects.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-objects.mm Fri Jul 18 10:52:10 2014
@@ -32,7 +32,7 @@ struct CGRect {
@synthesize frame;
// CHECK: define internal void @"\01-[I setPosition:]"
-// CHECK: call nonnull %class.S* @_ZN1SaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %class.S* @_ZN1SaSERKS_
// CHECK-NEXT: ret void
- (void)setFrame:(CGRect)frameRect {}
@@ -55,7 +55,7 @@ struct CGRect {
@end
// CHECK-LABEL: define i32 @main
-// CHECK: call void @_ZN1SC1ERKS_(%class.S* [[AGGTMP:%[a-zA-Z0-9\.]+]], %class.S* nonnull {{%[a-zA-Z0-9\.]+}})
+// CHECK: call void @_ZN1SC1ERKS_(%class.S* [[AGGTMP:%[a-zA-Z0-9\.]+]], %class.S* dereferenceable({{[0-9]+}}) {{%[a-zA-Z0-9\.]+}})
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %class.S*)*)(i8* {{%[a-zA-Z0-9\.]+}}, i8* {{%[a-zA-Z0-9\.]+}}, %class.S* [[AGGTMP]])
// CHECK-NEXT: ret i32 0
int main() {
@@ -68,7 +68,7 @@ int main() {
// rdar://8379892
// CHECK-LABEL: define void @_Z1fP1A
// CHECK: call void @_ZN1XC1Ev(%struct.X* [[LVTEMP:%[a-zA-Z0-9\.]+]])
-// CHECK: call void @_ZN1XC1ERKS_(%struct.X* [[AGGTMP:%[a-zA-Z0-9\.]+]], %struct.X* nonnull [[LVTEMP]])
+// CHECK: call void @_ZN1XC1ERKS_(%struct.X* [[AGGTMP:%[a-zA-Z0-9\.]+]], %struct.X* dereferenceable({{[0-9]+}}) [[LVTEMP]])
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.X*)*)({{.*}} %struct.X* [[AGGTMP]])
struct X {
X();
Modified: cfe/trunk/test/CodeGenObjCXX/property-reference.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-reference.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-reference.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-reference.mm Fri Jul 18 10:52:10 2014
@@ -26,7 +26,7 @@ void test0() {
const MyStruct& currentMyStruct = myClass.foo;
}
-// CHECK: [[C:%.*]] = call nonnull %struct.MyStruct* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: [[C:%.*]] = call dereferenceable({{[0-9]+}}) %struct.MyStruct* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: store %struct.MyStruct* [[C]], %struct.MyStruct** [[D:%.*]]
namespace test1 {
@@ -40,7 +40,7 @@ namespace test1 {
@implementation Test1
@synthesize prop1 = ivar;
@end
-// CHECK: define internal nonnull [[A:%.*]]* @"\01-[Test1 prop1]"(
+// CHECK: define internal dereferenceable({{[0-9]+}}) [[A:%.*]]* @"\01-[Test1 prop1]"(
// CHECK: [[SELF:%.*]] = alloca [[TEST1:%.*]]*, align 8
// CHECK: [[T0:%.*]] = load [[TEST1]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
@@ -49,7 +49,7 @@ namespace test1 {
// CHECK-NEXT: ret [[A]]* [[T3]]
// CHECK: define internal void @"\01-[Test1 setProp1:]"(
-// CHECK: call nonnull [[A]]* @_ZN5test11AaSERKS0_(
+// CHECK: call dereferenceable({{[0-9]+}}) [[A]]* @_ZN5test11AaSERKS0_(
// CHECK-NEXT: ret void
// rdar://problem/10497174
Modified: cfe/trunk/test/Modules/templates.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/templates.mm?rev=213386&r1=213385&r2=213386&view=diff
==============================================================================
--- cfe/trunk/test/Modules/templates.mm (original)
+++ cfe/trunk/test/Modules/templates.mm Fri Jul 18 10:52:10 2014
@@ -80,9 +80,9 @@ unsigned testMixedStruct() {
// CHECK: call {{.*}}memcpy{{.*}}(i8* %{{.*}}, i8* bitcast ({{.*}}* @_ZZ15testMixedStructvE1r to i8*), i64 16,
ListInt_right r{0, 2};
- // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* nonnull %[[l]])
+ // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* dereferenceable({{[0-9]+}}) %[[l]])
useListInt(l);
- // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* nonnull %[[r]])
+ // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* dereferenceable({{[0-9]+}}) %[[r]])
useListInt(r);
// CHECK: load i32* bitcast (i8* getelementptr inbounds (i8* bitcast ({{.*}}* @list_left to i8*), i64 8) to i32*)
More information about the cfe-commits
mailing list