Author: compnerd Date: Sat Jun 17 12:30:31 2017 New Revision: 305638 URL: http://llvm.org/viewvc/llvm-project?rev=305638&view=rev Log: CodeGen: make the type match the comment for a libcall
Fix the type for a (runtime) library call to match both the comment and the runtime implementation. As it happens, the type being used matched, this just makes it more precise. Added: cfe/trunk/test/CodeGenObjC/objc_copyStruct.m Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=305638&r1=305637&r2=305638&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original) +++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sat Jun 17 12:30:31 2017 @@ -308,7 +308,7 @@ public: SmallVector<CanQualType,5> Params; Params.push_back(Ctx.VoidPtrTy); Params.push_back(Ctx.VoidPtrTy); - Params.push_back(Ctx.LongTy); + Params.push_back(Ctx.getSizeType()); Params.push_back(Ctx.BoolTy); Params.push_back(Ctx.BoolTy); llvm::FunctionType *FTy = Added: cfe/trunk/test/CodeGenObjC/objc_copyStruct.m URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc_copyStruct.m?rev=305638&view=auto ============================================================================== --- cfe/trunk/test/CodeGenObjC/objc_copyStruct.m (added) +++ cfe/trunk/test/CodeGenObjC/objc_copyStruct.m Sat Jun 17 12:30:31 2017 @@ -0,0 +1,16 @@ +// RUN: %clang -target x86_64-unknown-windows-msvc -fobjc-runtime=ios -Wno-objc-root-class -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang -target x86_64-apple-ios -fobjc-runtime=ios -Wno-objc-root-class -S -o - -emit-llvm %s | FileCheck %s + +struct S { + float f, g; +}; + +@interface I +@property struct S s; +@end + +@implementation I +@end + +// CHECK: declare {{.*}}void @objc_copyStruct(i8*, i8*, i64, i1, i1) + _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits