[llvm-commits] [llvm] r86933 - /llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 11 18:52:57 PST 2009
Author: ddunbar
Date: Wed Nov 11 20:52:56 2009
New Revision: 86933
URL: http://llvm.org/viewvc/llvm-project?rev=86933&view=rev
Log:
Add the braces gcc suggested.
Modified:
llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=86933&r1=86932&r2=86933&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Wed Nov 11 20:52:56 2009
@@ -434,33 +434,36 @@
// Skip over all PHI nodes, remembering them for later.
BasicBlock::const_iterator OldI = BI->begin();
for (; (PN = dyn_cast<PHINode>(I)); ++I, ++OldI) {
- if (I->hasMetadata())
+ if (I->hasMetadata()) {
if (TheCallMD) {
if (MDNode *IMD = Context.getMetadata().getMD(DbgKind, I)) {
MDNode *NewMD = UpdateInlinedAtInfo(IMD, TheCallMD, Context);
Context.getMetadata().addMD(DbgKind, NewMD, I);
}
- } else
+ } else {
// The cloned instruction has dbg info but the call instruction
// does not have dbg info. Remove dbg info from cloned instruction.
Context.getMetadata().removeMD(DbgKind, I);
+ }
+ }
PHIToResolve.push_back(cast<PHINode>(OldI));
}
}
// Otherwise, remap the rest of the instructions normally.
for (; I != NewBB->end(); ++I) {
- if (I->hasMetadata())
+ if (I->hasMetadata()) {
if (TheCallMD) {
if (MDNode *IMD = Context.getMetadata().getMD(DbgKind, I)) {
MDNode *NewMD = UpdateInlinedAtInfo(IMD, TheCallMD, Context);
Context.getMetadata().addMD(DbgKind, NewMD, I);
}
- } else
+ } else {
// The cloned instruction has dbg info but the call instruction
// does not have dbg info. Remove dbg info from cloned instruction.
Context.getMetadata().removeMD(DbgKind, I);
-
+ }
+ }
RemapInstruction(I, ValueMap);
}
}
More information about the llvm-commits
mailing list