From: Mike Stump Date: Tue, 17 Nov 2009 00:10:05 +0000 (+0000) Subject: Since we always have 2 edges, we don't need to reserve 3 slot for the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14431c16d131560265254201df5ee575b8e3578f;p=clang Since we always have 2 edges, we don't need to reserve 3 slot for the PHI node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89005 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCXXExpr.cpp b/lib/CodeGen/CGCXXExpr.cpp index 78734a00fb..eff432a05c 100644 --- a/lib/CodeGen/CGCXXExpr.cpp +++ b/lib/CodeGen/CGCXXExpr.cpp @@ -512,7 +512,7 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(llvm::Value *V, EmitBlock(ContBlock); if (CanBeZero) { llvm::PHINode *PHI = Builder.CreatePHI(LTy); - PHI->reserveOperandSpace(3); + PHI->reserveOperandSpace(2); PHI->addIncoming(V, NonZeroBlock); PHI->addIncoming(llvm::Constant::getNullValue(LTy), NullBlock); V = PHI;