diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /lib/CodeGen/CGObjCRuntime.cpp | |
parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) |
Notes
Diffstat (limited to 'lib/CodeGen/CGObjCRuntime.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCRuntime.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/lib/CodeGen/CGObjCRuntime.cpp b/lib/CodeGen/CGObjCRuntime.cpp index 7be9ae996040..0caf6d9f210a 100644 --- a/lib/CodeGen/CGObjCRuntime.cpp +++ b/lib/CodeGen/CGObjCRuntime.cpp @@ -120,9 +120,8 @@ LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF, uint64_t BitOffset = FieldBitOffset % CGF.CGM.getContext().getCharWidth(); uint64_t AlignmentBits = CGF.CGM.getTarget().getCharAlign(); uint64_t BitFieldSize = Ivar->getBitWidthValue(CGF.getContext()); - CharUnits StorageSize = - CGF.CGM.getContext().toCharUnitsFromBits( - llvm::RoundUpToAlignment(BitOffset + BitFieldSize, AlignmentBits)); + CharUnits StorageSize = CGF.CGM.getContext().toCharUnitsFromBits( + llvm::alignTo(BitOffset + BitFieldSize, AlignmentBits)); CharUnits Alignment = CGF.CGM.getContext().toCharUnitsFromBits(AlignmentBits); // Allocate a new CGBitFieldInfo object to describe this access. @@ -364,25 +363,15 @@ CGObjCRuntime::getMessageSendInfo(const ObjCMethodDecl *method, llvm::PointerType *signatureType = CGM.getTypes().GetFunctionType(signature)->getPointerTo(); - // If that's not variadic, there's no need to recompute the ABI - // arrangement. - if (!signature.isVariadic()) - return MessageSendInfo(signature, signatureType); + const CGFunctionInfo &signatureForCall = + CGM.getTypes().arrangeCall(signature, callArgs); - // Otherwise, there is. - FunctionType::ExtInfo einfo = signature.getExtInfo(); - const CGFunctionInfo &argsInfo = - CGM.getTypes().arrangeFreeFunctionCall(resultType, callArgs, einfo, - signature.getRequiredArgs()); - - return MessageSendInfo(argsInfo, signatureType); + return MessageSendInfo(signatureForCall, signatureType); } // There's no method; just use a default CC. const CGFunctionInfo &argsInfo = - CGM.getTypes().arrangeFreeFunctionCall(resultType, callArgs, - FunctionType::ExtInfo(), - RequiredArgs::All); + CGM.getTypes().arrangeUnprototypedObjCMessageSend(resultType, callArgs); // Derive the signature to call from that. llvm::PointerType *signatureType = |