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 | ca952c52f087865e3c6c1f0dac25afdb0aaaf878 (patch) | |
tree | 111101113dc0f67b13a0b7e8390da1daa2effb4e /lib/Transforms/Utils | |
parent | 6d8d8157e6b3996d6c6ebe50909c8bfaabf40a31 (diff) | |
download | external_llvm-ca952c52f087865e3c6c1f0dac25afdb0aaaf878.zip external_llvm-ca952c52f087865e3c6c1f0dac25afdb0aaaf878.tar.gz external_llvm-ca952c52f087865e3c6c1f0dac25afdb0aaaf878.tar.bz2 |
Use an array instead of a SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/CloneFunction.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 038e7ba..7d7f1a4 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/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); |