summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp12
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp2
2 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 4c8dbb72514..a1af40546b7 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -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);
}
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index c2dfaf52746..b8c0a7e47b5 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1123,7 +1123,7 @@ bool llvm::replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
// "deref" operation to a list of address elements, as new llvm.dbg.declare
// will take a value storing address of the memory for variable, not
// alloca itself.
- SmallVector<int64_t, 4> NewDIExpr;
+ SmallVector<uint64_t, 4> NewDIExpr;
NewDIExpr.push_back(dwarf::DW_OP_deref);
if (DIExpr)
for (unsigned i = 0, n = DIExpr.getNumElements(); i < n; ++i)
OpenPOWER on IntegriCloud