diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-11-12 02:52:56 +0000 | 
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-12 02:52:56 +0000 | 
| commit | 11881e22837fb60346261a88c62127bf0b4659fd (patch) | |
| tree | cd9cfadc9daecb5670072118bfd5b5d7fca96cb0 /llvm/lib/Transforms/Utils | |
| parent | 383c273966c20b029ee2f104ec7d6318c9968006 (diff) | |
| download | bcm5719-llvm-11881e22837fb60346261a88c62127bf0b4659fd.tar.gz bcm5719-llvm-11881e22837fb60346261a88c62127bf0b4659fd.zip | |
Add the braces gcc suggested.
llvm-svn: 86933
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index e56260677ed..162d7b3502c 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/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);      }    } | 

