mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
IR: Take uint64_t in DIBuilder::createExpression()
`DIExpression` deals with `uint64_t`, so it doesn't make sense that `createExpression()` is created from `int64_t`. Switch to `uint64_t` to unify them. I've temporarily left in the `int64_t` version, which forwards to the `uint64_t` version. I'll delete it once I've updated the callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228619 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -947,17 +947,23 @@ DIVariable DIBuilder::createLocalVariable(unsigned Tag, DIDescriptor Scope,
|
||||
return RetVar;
|
||||
}
|
||||
|
||||
DIExpression DIBuilder::createExpression(ArrayRef<int64_t> Addr) {
|
||||
DIExpression DIBuilder::createExpression(ArrayRef<uint64_t> Addr) {
|
||||
auto Header = HeaderBuilder::get(DW_TAG_expression);
|
||||
for (int64_t I : Addr)
|
||||
for (uint64_t I : Addr)
|
||||
Header.concat(I);
|
||||
Metadata *Elts[] = {Header.get(VMContext)};
|
||||
return DIExpression(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
DIExpression DIBuilder::createExpression(ArrayRef<int64_t> Signed) {
|
||||
// TODO: Remove the callers of this signed version and delete.
|
||||
SmallVector<uint64_t, 8> Addr(Signed.begin(), Signed.end());
|
||||
return createExpression(Addr);
|
||||
}
|
||||
|
||||
DIExpression DIBuilder::createPieceExpression(unsigned OffsetInBytes,
|
||||
unsigned SizeInBytes) {
|
||||
int64_t Addr[] = {dwarf::DW_OP_piece, OffsetInBytes, SizeInBytes};
|
||||
uint64_t Addr[] = {dwarf::DW_OP_piece, OffsetInBytes, SizeInBytes};
|
||||
return createExpression(Addr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user