summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-12 02:52:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-12 02:52:56 +0000
commitdfa9261f6835f728d9009f16fa51cff25cf20aa9 (patch)
tree7589675a963b7403572e31f1da6404939345b884 /lib/Transforms/Utils/CloneFunction.cpp
parentad108baf47b32d57781bc826107684113b0c47d0 (diff)
downloadllvm-dfa9261f6835f728d9009f16fa51cff25cf20aa9.tar.gz
llvm-dfa9261f6835f728d9009f16fa51cff25cf20aa9.tar.bz2
llvm-dfa9261f6835f728d9009f16fa51cff25cf20aa9.tar.xz
Add the braces gcc suggested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp
index e56260677e..162d7b3502 100644
--- a/lib/Transforms/Utils/CloneFunction.cpp
+++ b/lib/Transforms/Utils/CloneFunction.cpp
@@ -434,33 +434,36 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
// 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);
}
}