mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Fix DIExpression::ExprOperand::appendToVector
appendToVector used the wrong overload of SmallVector::append, resulting in it appending the same element to a vector `getSize()` times. This did not cause a problem when initially committed because appendToVector was only used to append 1-element operands. This changes appendToVector to use the correct overload of append(). Testing: ./unittests/IR/IRTests --gtest_filter='*DIExpressionTest*' llvm-svn: 336466
This commit is contained in:
parent
0bce44c380
commit
28a93dc229
@ -2329,7 +2329,7 @@ public:
|
||||
|
||||
/// Append the elements of this operand to \p V.
|
||||
void appendToVector(SmallVectorImpl<uint64_t> &V) const {
|
||||
V.append(getSize(), *get());
|
||||
V.append(get(), get() + getSize());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -834,9 +834,7 @@ DIExpression *DIExpression::prependOpcodes(const DIExpression *Expr,
|
||||
StackValue = false;
|
||||
}
|
||||
}
|
||||
Ops.push_back(Op.getOp());
|
||||
for (unsigned I = 0; I < Op.getNumArgs(); ++I)
|
||||
Ops.push_back(Op.getArg(I));
|
||||
Op.appendToVector(Ops);
|
||||
}
|
||||
if (StackValue)
|
||||
Ops.push_back(dwarf::DW_OP_stack_value);
|
||||
@ -906,9 +904,7 @@ Optional<DIExpression *> DIExpression::createFragmentExpression(
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Ops.push_back(Op.getOp());
|
||||
for (unsigned I = 0; I < Op.getNumArgs(); ++I)
|
||||
Ops.push_back(Op.getArg(I));
|
||||
Op.appendToVector(Ops);
|
||||
}
|
||||
}
|
||||
Ops.push_back(dwarf::DW_OP_LLVM_fragment);
|
||||
|
Loading…
Reference in New Issue
Block a user