diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-29 11:04:52 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-29 11:04:52 +0000 |
commit | 756d7086c14003ce429115e74079931cdf50ebeb (patch) | |
tree | 9592fcb3ea0a862953a11d57b80c5071b7ce18d3 /llvm/lib/Transforms/Utils | |
parent | 8e805be369fd63ecaedfe7ede21f28d616559c2a (diff) | |
download | bcm5719-llvm-756d7086c14003ce429115e74079931cdf50ebeb.tar.gz bcm5719-llvm-756d7086c14003ce429115e74079931cdf50ebeb.zip |
Use an array instead of a SmallVector.
llvm-svn: 92264
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-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 038e7ba08ac..7d7f1a4d970 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -359,12 +359,13 @@ static MDNode *UpdateInlinedAtInfo(MDNode *InsnMD, MDNode *TheCallMD) { if (!OrigLocation.isNull()) NewLoc = UpdateInlinedAtInfo(OrigLocation.getNode(), TheCallMD); - SmallVector<Value *, 4> MDVs; - MDVs.push_back(InsnMD->getElement(0)); // Line - MDVs.push_back(InsnMD->getElement(1)); // Col - MDVs.push_back(InsnMD->getElement(2)); // Scope - MDVs.push_back(NewLoc); - return MDNode::get(InsnMD->getContext(), MDVs.data(), MDVs.size()); + Value *MDVs[] = { + InsnMD->getElement(0), // Line + InsnMD->getElement(1), // Col + InsnMD->getElement(2), // Scope + NewLoc + }; + return MDNode::get(InsnMD->getContext(), MDVs, 4); } /// CloneAndPruneFunctionInto - This works exactly like CloneFunctionInto, @@ -422,7 +423,6 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, unsigned DbgKind = OldFunc->getContext().getMDKindID("dbg"); MDNode *TheCallMD = NULL; - SmallVector<Value *, 4> MDVs; if (TheCall && TheCall->hasMetadata()) TheCallMD = TheCall->getMetadata(DbgKind); |