projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remember to set flag.
[oota-llvm.git]
/
lib
/
CodeGen
/
DwarfEHPrepare.cpp
diff --git
a/lib/CodeGen/DwarfEHPrepare.cpp
b/lib/CodeGen/DwarfEHPrepare.cpp
index d5a2ed977f3a47b765cc8e301f631073bbd26ece..34b1a396bb721e706e5b8c8b68b3f7e8ad55d129 100644
(file)
--- a/
lib/CodeGen/DwarfEHPrepare.cpp
+++ b/
lib/CodeGen/DwarfEHPrepare.cpp
@@
-439,8
+439,9
@@
bool DwarfEHPrepare::NormalizeLandingPads() {
if (InVal == 0) {
// Different unwind edges have different values. Create a new PHI node
// in NewBB.
if (InVal == 0) {
// Different unwind edges have different values. Create a new PHI node
// in NewBB.
- PHINode *NewPN = PHINode::Create(PN->getType(), PN->getName()+".unwind",
- NewBB);
+ PHINode *NewPN = PHINode::Create(PN->getType(),
+ PN->getNumIncomingValues(),
+ PN->getName()+".unwind", NewBB);
// Add an entry for each unwind edge, using the value from the old PHI.
for (pred_iterator PI = PB; PI != PE; ++PI)
NewPN->addIncoming(PN->getIncomingValueForBlock(*PI), *PI);
// Add an entry for each unwind edge, using the value from the old PHI.
for (pred_iterator PI = PB; PI != PE; ++PI)
NewPN->addIncoming(PN->getIncomingValueForBlock(*PI), *PI);