diff options
Diffstat (limited to 'lib/Transforms/Utils/LowerSelect.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerSelect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/LowerSelect.cpp b/lib/Transforms/Utils/LowerSelect.cpp index 5f9f593f9d..27e1866eaf 100644 --- a/lib/Transforms/Utils/LowerSelect.cpp +++ b/lib/Transforms/Utils/LowerSelect.cpp @@ -85,8 +85,8 @@ bool LowerSelect::runOnFunction(Function &F) { new BranchInst(NewTrue, NewCont, SI->getCondition(), BB); // Create a new PHI node in the cont block with the entries we need. - std::string Name = SI->getName(); SI->setName(""); - PHINode *PN = new PHINode(SI->getType(), Name, NewCont->begin()); + PHINode *PN = new PHINode(SI->getType(), "", NewCont->begin()); + PN->takeName(SI); PN->addIncoming(SI->getTrueValue(), NewTrue); PN->addIncoming(SI->getFalseValue(), BB); |