diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-03-30 11:19:20 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-03-30 11:19:20 +0000 |
commit | e0938d8a87a6c8b12f68fbe784a270dd2d552331 (patch) | |
tree | 98d4fbcf8ebe8ec03e205e22d98469b177234a95 /llvm/examples/Kaleidoscope/Chapter7/toy.cpp | |
parent | 27e20c3c586da61e5fe9218aa9fe5733e34c18c2 (diff) | |
download | bcm5719-llvm-e0938d8a87a6c8b12f68fbe784a270dd2d552331.tar.gz bcm5719-llvm-e0938d8a87a6c8b12f68fbe784a270dd2d552331.zip |
(Almost) always call reserveOperandSpace() on newly created PHINodes.
llvm-svn: 128535
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter7/toy.cpp')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter7/toy.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp index e63578f57e6..4070d3f38e7 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp @@ -752,6 +752,7 @@ Value *IfExprAST::Codegen() { Builder.SetInsertPoint(MergeBB); PHINode *PN = Builder.CreatePHI(Type::getDoubleTy(getGlobalContext()), "iftmp"); + PN->reserveOperandSpace(2); PN->addIncoming(ThenV, ThenBB); PN->addIncoming(ElseV, ElseBB); |