diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-12-06 00:48:17 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-12-06 00:48:17 +0000 |
| commit | b236211c4ccd4cc9c96ff622771b400d07fc91cb (patch) | |
| tree | 9c6d59db1f12a72777228a0e7462f8a00948d205 /llvm/lib | |
| parent | b13f7d2e36b12af3a534c8df5d48861d94637f30 (diff) | |
| download | bcm5719-llvm-b236211c4ccd4cc9c96ff622771b400d07fc91cb.tar.gz bcm5719-llvm-b236211c4ccd4cc9c96ff622771b400d07fc91cb.zip | |
Utils: Style cleanups, NFC
llvm-svn: 223556
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index adad9709f1a..6b86378bc2e 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -164,13 +164,13 @@ static MDNode* FindSubprogram(const Function *F, DebugInfoFinder &Finder) { // Add an operand to an existing MDNode. The new operand will be added at the // back of the operand list. -static void AddOperand(DICompileUnit CU, MDNode *Node, Value *Operand) { - SmallVector<Value*, 16> Operands; - for (unsigned i = 0; i < Node->getNumOperands(); i++) { - Operands.push_back(Node->getOperand(i)); - } - Operands.push_back(Operand); - CU.replaceSubprograms(DIArray(MDNode::get(CU->getContext(), Operands))); +static void AddOperand(DICompileUnit CU, DIArray SPs, Value *NewSP) { + SmallVector<Value *, 16> NewSPs; + NewSPs.reserve(SPs->getNumOperands() + 1); + for (unsigned I = 0, E = SPs->getNumOperands(); I != E; ++I) + NewSPs.push_back(SPs->getOperand(I)); + NewSPs.push_back(NewSP); + CU.replaceSubprograms(DIArray(MDNode::get(CU->getContext(), NewSPs))); } // Clone the module-level debug info associated with OldFunc. The cloned data |

