]> granicus.if.org Git - clang/commitdiff
Let's do super message sends with static allocas instead of dynamic ones.
authorJohn McCall <rjmccall@apple.com>
Fri, 4 Mar 2011 08:00:29 +0000 (08:00 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 4 Mar 2011 08:00:29 +0000 (08:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126989 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index 68fb92081f5d3f4a111ffdeb1a5875834fa13e3c..d2af104e4836b62d6482b074cd7a55c20e656d8f 100644 (file)
@@ -1556,7 +1556,7 @@ CGObjCMac::GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF,
   // Create and init a super structure; this is a (receiver, class)
   // pair we will pass to objc_msgSendSuper.
   llvm::Value *ObjCSuper =
-    CGF.Builder.CreateAlloca(ObjCTypes.SuperTy, 0, "objc_super");
+    CGF.CreateTempAlloca(ObjCTypes.SuperTy, "objc_super");
   llvm::Value *ReceiverAsObject =
     CGF.Builder.CreateBitCast(Receiver, ObjCTypes.ObjectPtrTy);
   CGF.Builder.CreateStore(ReceiverAsObject,
@@ -5837,7 +5837,7 @@ CGObjCNonFragileABIMac::GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF,
   // Create and init a super structure; this is a (receiver, class)
   // pair we will pass to objc_msgSendSuper.
   llvm::Value *ObjCSuper =
-    CGF.Builder.CreateAlloca(ObjCTypes.SuperTy, 0, "objc_super");
+    CGF.CreateTempAlloca(ObjCTypes.SuperTy, "objc_super");
 
   llvm::Value *ReceiverAsObject =
     CGF.Builder.CreateBitCast(Receiver, ObjCTypes.ObjectPtrTy);