mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-13 17:38:39 +00:00
Use an array instead of a SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92264 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf0ca2b477
commit
fda08e1308
@ -359,12 +359,13 @@ static MDNode *UpdateInlinedAtInfo(MDNode *InsnMD, MDNode *TheCallMD) {
|
|||||||
if (!OrigLocation.isNull())
|
if (!OrigLocation.isNull())
|
||||||
NewLoc = UpdateInlinedAtInfo(OrigLocation.getNode(), TheCallMD);
|
NewLoc = UpdateInlinedAtInfo(OrigLocation.getNode(), TheCallMD);
|
||||||
|
|
||||||
SmallVector<Value *, 4> MDVs;
|
Value *MDVs[] = {
|
||||||
MDVs.push_back(InsnMD->getElement(0)); // Line
|
InsnMD->getElement(0), // Line
|
||||||
MDVs.push_back(InsnMD->getElement(1)); // Col
|
InsnMD->getElement(1), // Col
|
||||||
MDVs.push_back(InsnMD->getElement(2)); // Scope
|
InsnMD->getElement(2), // Scope
|
||||||
MDVs.push_back(NewLoc);
|
NewLoc
|
||||||
return MDNode::get(InsnMD->getContext(), MDVs.data(), MDVs.size());
|
};
|
||||||
|
return MDNode::get(InsnMD->getContext(), MDVs, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// CloneAndPruneFunctionInto - This works exactly like CloneFunctionInto,
|
/// CloneAndPruneFunctionInto - This works exactly like CloneFunctionInto,
|
||||||
@ -422,7 +423,6 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
|
|||||||
|
|
||||||
unsigned DbgKind = OldFunc->getContext().getMDKindID("dbg");
|
unsigned DbgKind = OldFunc->getContext().getMDKindID("dbg");
|
||||||
MDNode *TheCallMD = NULL;
|
MDNode *TheCallMD = NULL;
|
||||||
SmallVector<Value *, 4> MDVs;
|
|
||||||
if (TheCall && TheCall->hasMetadata())
|
if (TheCall && TheCall->hasMetadata())
|
||||||
TheCallMD = TheCall->getMetadata(DbgKind);
|
TheCallMD = TheCall->getMetadata(DbgKind);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user