forked from OSchip/llvm-project
[clang][CodeGen] Remove the signed version of createExpression
Fix a TODO. Remove the callers of this signed version and delete. Reviewed By: CodaFi Differential Revision: https://reviews.llvm.org/D116014
This commit is contained in:
parent
5d47e7d768
commit
ec501f15a8
|
@ -722,7 +722,7 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
|
|||
auto *LowerBound =
|
||||
llvm::ConstantAsMetadata::get(llvm::ConstantInt::getSigned(
|
||||
llvm::Type::getInt64Ty(CGM.getLLVMContext()), 0));
|
||||
SmallVector<int64_t, 9> Expr(
|
||||
SmallVector<uint64_t, 9> 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 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
|
|||
}
|
||||
|
||||
// Element count = (VLENB / SEW) x LMUL
|
||||
SmallVector<int64_t, 12> Expr(
|
||||
SmallVector<uint64_t, 12> 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::CreateLexicalBlock(SourceLocation Loc) {
|
|||
}
|
||||
|
||||
void CGDebugInfo::AppendAddressSpaceXDeref(
|
||||
unsigned AddressSpace, SmallVectorImpl<int64_t> &Expr) const {
|
||||
unsigned AddressSpace, SmallVectorImpl<uint64_t> &Expr) const {
|
||||
Optional<unsigned> DWARFAddressSpace =
|
||||
CGM.getTarget().getDWARFAddressSpace(AddressSpace);
|
||||
if (!DWARFAddressSpace)
|
||||
|
@ -4494,7 +4494,7 @@ llvm::DILocalVariable *CGDebugInfo::EmitDeclare(const VarDecl *VD,
|
|||
Line = getLineNumber(VD->getLocation());
|
||||
Column = getColumnNumber(VD->getLocation());
|
||||
}
|
||||
SmallVector<int64_t, 13> Expr;
|
||||
SmallVector<uint64_t, 13> Expr;
|
||||
llvm::DINode::DIFlags Flags = llvm::DINode::FlagZero;
|
||||
if (VD->isImplicit())
|
||||
Flags |= llvm::DINode::FlagArtificial;
|
||||
|
@ -4720,7 +4720,7 @@ void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(
|
|||
target.getStructLayout(blockInfo.StructureType)
|
||||
->getElementOffset(blockInfo.getCapture(VD).getIndex()));
|
||||
|
||||
SmallVector<int64_t, 9> addr;
|
||||
SmallVector<uint64_t, 9> 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 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
|
|||
} else {
|
||||
auto Align = getDeclAlignIfRequired(D, CGM.getContext());
|
||||
|
||||
SmallVector<int64_t, 4> Expr;
|
||||
SmallVector<uint64_t, 4> Expr;
|
||||
unsigned AddressSpace =
|
||||
CGM.getContext().getTargetAddressSpace(D->getType());
|
||||
if (CGM.getLangOpts().CUDA && CGM.getLangOpts().CUDAIsDevice) {
|
||||
|
|
|
@ -363,7 +363,7 @@ class CGDebugInfo {
|
|||
/// Extended dereferencing mechanism is has the following format:
|
||||
/// DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef
|
||||
void AppendAddressSpaceXDeref(unsigned AddressSpace,
|
||||
SmallVectorImpl<int64_t> &Expr) const;
|
||||
SmallVectorImpl<uint64_t> &Expr) const;
|
||||
|
||||
/// A helper function to collect debug info for the default elements of a
|
||||
/// block.
|
||||
|
|
|
@ -865,7 +865,7 @@ value llvm_instr_set_debug_loc(LLVMValueRef Inst, LLVMMetadataRef Loc) {
|
|||
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(
|
||||
|
|
|
@ -1102,7 +1102,7 @@ LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef Builder,
|
|||
* \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 LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Builder,
|
|||
*/
|
||||
LLVMMetadataRef
|
||||
LLVMDIBuilderCreateConstantValueExpression(LLVMDIBuilderRef Builder,
|
||||
int64_t Value);
|
||||
uint64_t Value);
|
||||
|
||||
/**
|
||||
* Create a new descriptor for the specified variable.
|
||||
|
|
|
@ -698,7 +698,6 @@ namespace llvm {
|
|||
/// variable which has a complex address expression for its address.
|
||||
/// \param Addr An array of complex address operations.
|
||||
DIExpression *createExpression(ArrayRef<uint64_t> Addr = None);
|
||||
DIExpression *createExpression(ArrayRef<int64_t> Addr);
|
||||
|
||||
/// Create an expression for a variable that does not have an address, but
|
||||
/// does have a constant value.
|
||||
|
|
|
@ -821,12 +821,6 @@ DIExpression *DIBuilder::createExpression(ArrayRef<uint64_t> Addr) {
|
|||
return DIExpression::get(VMContext, Addr);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
template <class... Ts>
|
||||
static DISubprogram *getSubprogram(bool IsDistinct, Ts &&...Args) {
|
||||
if (IsDistinct)
|
||||
|
|
|
@ -1436,14 +1436,14 @@ LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Builder,
|
|||
}
|
||||
|
||||
LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Builder,
|
||||
int64_t *Addr, size_t Length) {
|
||||
return wrap(unwrap(Builder)->createExpression(ArrayRef<int64_t>(Addr,
|
||||
Length)));
|
||||
uint64_t *Addr, size_t Length) {
|
||||
return wrap(
|
||||
unwrap(Builder)->createExpression(ArrayRef<uint64_t>(Addr, Length)));
|
||||
}
|
||||
|
||||
LLVMMetadataRef
|
||||
LLVMDIBuilderCreateConstantValueExpression(LLVMDIBuilderRef Builder,
|
||||
int64_t Value) {
|
||||
uint64_t Value) {
|
||||
return wrap(unwrap(Builder)->createConstantValueExpression(Value));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue