mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-02 09:33:59 +00:00
Reorder the code to avoid inserting at the beginning of a vector.
As per dblaikie suggestion, thanks\! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223808 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9512d7f684
commit
53c4c062c1
@ -1120,12 +1120,12 @@ bool llvm::replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
|
||||
// will take a value storing address of the memory for variable, not
|
||||
// alloca itself.
|
||||
SmallVector<int64_t, 4> NewDIExpr;
|
||||
NewDIExpr.push_back(dwarf::DW_OP_deref);
|
||||
if (DIExpr) {
|
||||
for (unsigned i = 0, n = DIExpr.getNumElements(); i < n; ++i) {
|
||||
NewDIExpr.push_back(DIExpr.getElement(i));
|
||||
}
|
||||
}
|
||||
NewDIExpr.insert(NewDIExpr.begin(), dwarf::DW_OP_deref);
|
||||
|
||||
// Insert llvm.dbg.declare in the same basic block as the original alloca,
|
||||
// and remove old llvm.dbg.declare.
|
||||
|
Loading…
x
Reference in New Issue
Block a user