diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -363,7 +363,7 @@ /// Extended dereferencing mechanism is has the following format: /// DW_OP_constu DW_OP_swap DW_OP_xderef void AppendAddressSpaceXDeref(unsigned AddressSpace, - SmallVectorImpl &Expr) const; + SmallVectorImpl &Expr) const; /// A helper function to collect debug info for the default elements of a /// block. diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -722,7 +722,7 @@ auto *LowerBound = llvm::ConstantAsMetadata::get(llvm::ConstantInt::getSigned( llvm::Type::getInt64Ty(CGM.getLLVMContext()), 0)); - SmallVector Expr( + SmallVector Expr( {llvm::dwarf::DW_OP_constu, NumElemsPerVG, llvm::dwarf::DW_OP_bregx, /* AArch64::VG */ 46, 0, llvm::dwarf::DW_OP_mul, llvm::dwarf::DW_OP_constu, 1, llvm::dwarf::DW_OP_minus}); @@ -768,7 +768,7 @@ } // Element count = (VLENB / SEW) x LMUL - SmallVector Expr( + SmallVector Expr( // The DW_OP_bregx operation has two operands: a register which is // specified by an unsigned LEB128 number, followed by a signed LEB128 // offset. @@ -4325,7 +4325,7 @@ } void CGDebugInfo::AppendAddressSpaceXDeref( - unsigned AddressSpace, SmallVectorImpl &Expr) const { + unsigned AddressSpace, SmallVectorImpl &Expr) const { Optional DWARFAddressSpace = CGM.getTarget().getDWARFAddressSpace(AddressSpace); if (!DWARFAddressSpace) @@ -4494,7 +4494,7 @@ Line = getLineNumber(VD->getLocation()); Column = getColumnNumber(VD->getLocation()); } - SmallVector Expr; + SmallVector Expr; llvm::DINode::DIFlags Flags = llvm::DINode::FlagZero; if (VD->isImplicit()) Flags |= llvm::DINode::FlagArtificial; @@ -4720,7 +4720,7 @@ target.getStructLayout(blockInfo.StructureType) ->getElementOffset(blockInfo.getCapture(VD).getIndex())); - SmallVector addr; + SmallVector addr; addr.push_back(llvm::dwarf::DW_OP_deref); addr.push_back(llvm::dwarf::DW_OP_plus_uconst); addr.push_back(offset.getQuantity()); @@ -5191,7 +5191,7 @@ } else { auto Align = getDeclAlignIfRequired(D, CGM.getContext()); - SmallVector Expr; + SmallVector Expr; unsigned AddressSpace = CGM.getContext().getTargetAddressSpace(D->getType()); if (CGM.getLangOpts().CUDA && CGM.getLangOpts().CUDAIsDevice) { diff --git a/llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c b/llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c --- a/llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c +++ b/llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c @@ -865,7 +865,7 @@ LLVMMetadataRef llvm_dibuild_create_constant_value_expression(value Builder, value Value) { return LLVMDIBuilderCreateConstantValueExpression(DIBuilder_val(Builder), - (int64_t)Int_val(Value)); + (uint64_t)Int_val(Value)); } LLVMMetadataRef llvm_dibuild_create_global_variable_expression_native( diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -1102,7 +1102,7 @@ * \param Length Length of the address operation array. */ LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Builder, - int64_t *Addr, size_t Length); + uint64_t *Addr, size_t Length); /** * Create a new descriptor for the specified variable that does not have an @@ -1112,7 +1112,7 @@ */ LLVMMetadataRef LLVMDIBuilderCreateConstantValueExpression(LLVMDIBuilderRef Builder, - int64_t Value); + uint64_t Value); /** * Create a new descriptor for the specified variable. diff --git a/llvm/include/llvm/IR/DIBuilder.h b/llvm/include/llvm/IR/DIBuilder.h --- a/llvm/include/llvm/IR/DIBuilder.h +++ b/llvm/include/llvm/IR/DIBuilder.h @@ -698,7 +698,6 @@ /// variable which has a complex address expression for its address. /// \param Addr An array of complex address operations. DIExpression *createExpression(ArrayRef Addr = None); - DIExpression *createExpression(ArrayRef Addr); /// Create an expression for a variable that does not have an address, but /// does have a constant value. diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -821,12 +821,6 @@ return DIExpression::get(VMContext, Addr); } -DIExpression *DIBuilder::createExpression(ArrayRef Signed) { - // TODO: Remove the callers of this signed version and delete. - SmallVector Addr(Signed.begin(), Signed.end()); - return createExpression(Addr); -} - template static DISubprogram *getSubprogram(bool IsDistinct, Ts &&...Args) { if (IsDistinct) diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -1436,14 +1436,14 @@ } LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Builder, - int64_t *Addr, size_t Length) { - return wrap(unwrap(Builder)->createExpression(ArrayRef(Addr, - Length))); + uint64_t *Addr, size_t Length) { + return wrap( + unwrap(Builder)->createExpression(ArrayRef(Addr, Length))); } LLVMMetadataRef LLVMDIBuilderCreateConstantValueExpression(LLVMDIBuilderRef Builder, - int64_t Value) { + uint64_t Value) { return wrap(unwrap(Builder)->createConstantValueExpression(Value)); }