mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-25 05:25:53 +00:00
Add the braces gcc suggested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad108baf47
commit
dfa9261f68
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user