summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LowerSelect.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-11 01:37:51 +0000
committerChris Lattner <sabre@nondot.org>2007-02-11 01:37:51 +0000
commit8dd4cae4f8816e3c498bbb2efdf4edf03d229bff (patch)
treebbcf2b9eff048590e8a22fc1fbfcf16fb6c6c461 /llvm/lib/Transforms/Utils/LowerSelect.cpp
parent6e0123b17f519377e277281cf9e7a70c1b1dbb96 (diff)
downloadbcm5719-llvm-8dd4cae4f8816e3c498bbb2efdf4edf03d229bff.tar.gz
bcm5719-llvm-8dd4cae4f8816e3c498bbb2efdf4edf03d229bff.zip
simplify code by using Value::takeName
llvm-svn: 34177
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSelect.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LowerSelect.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSelect.cpp b/llvm/lib/Transforms/Utils/LowerSelect.cpp
index 5f9f593f9d1..27e1866eaf0 100644
--- a/llvm/lib/Transforms/Utils/LowerSelect.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud