summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-12-26 23:12:42 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-12-26 23:12:42 +0000
commit125ef76934f37e3fdc8ce4a2cc238850d06c5912 (patch)
treed6b757f38590e8180b445e379dd119da1161ffa9
parentd6e2560e7aea0e6c6bca950966252552f1caec63 (diff)
downloadllvm-125ef76934f37e3fdc8ce4a2cc238850d06c5912.tar.gz
llvm-125ef76934f37e3fdc8ce4a2cc238850d06c5912.tar.bz2
llvm-125ef76934f37e3fdc8ce4a2cc238850d06c5912.tar.xz
Fix warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147284 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index bc70c51cc0..43d56ef099 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -938,13 +938,14 @@ public:
void run(AllocaInst *AI, const SmallVectorImpl<Instruction*> &Insts) {
// Remember which alloca we're promoting (for isInstInList).
this->AI = AI;
- if (MDNode *DebugNode = MDNode::getIfExists(AI->getContext(), AI))
+ if (MDNode *DebugNode = MDNode::getIfExists(AI->getContext(), AI)) {
for (Value::use_iterator UI = DebugNode->use_begin(),
E = DebugNode->use_end(); UI != E; ++UI)
if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(*UI))
DDIs.push_back(DDI);
else if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(*UI))
DVIs.push_back(DVI);
+ }
LoadAndStorePromoter::run(Insts);
AI->eraseFromParent();