10 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H
11 #define LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H
46 assert(cast<DIExpression>(Expr)->isValid());
88 Values.push_back(std::move(Val));
96 if (Begin == Next.Begin) {
97 auto *Expr = cast_or_null<DIExpression>(Values[0].Expression);
98 auto *NextExpr = cast_or_null<DIExpression>(Next.Values[0].Expression);
99 if (Expr->isBitPiece() && NextExpr->isBitPiece()) {
114 if ((End == Next.Begin && Values == Next.Values)) {
125 Values.append(Vals.
begin(), Vals.
end());
128 return V.isBitPiece();
129 }) &&
"value must be a piece");
135 std::sort(Values.begin(), Values.end());
138 Values.begin(), Values.end(), [](
const Value &
A,
const Value &B) {
MachineLocation getLoc() const
bool MergeRanges(const DebugLocEntry &Next)
Attempt to merge this DebugLocEntry with Next and return true if the merge was successful.
const ConstantInt * getConstantInt() const
Builder for DebugLocStream lists.
friend bool operator==(const Value &, const Value &)
Compare two Values for equality.
This struct describes location entries emitted in the .debug_loc section.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
const ConstantFP * getConstantFP() const
Value(const DIExpression *Expr, int64_t i)
const DIExpression * Expression
Any complex address location expression for this Value.
Value(const DIExpression *Expr, const ConstantFP *CFP)
EntryType
Type of entry that this represents.
ArrayRef< Value > getValues() const
const DIExpression * getExpression() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
DebugLocEntry(const MCSymbol *B, const MCSymbol *E, Value Val)
Value(const DIExpression *Expr, const ConstantInt *CIP)
bool MergeValues(const DebugLocEntry &Next)
If this and Next are describing different pieces of the same variable, merge them by appending Next's...
const MCSymbol * getBeginSym() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Value(const DIExpression *Expr, MachineLocation Loc)
const MCSymbol * getEndSym() const
friend bool operator<(const Value &, const Value &)
Compare two pieces based on their offset.
bool isConstantInt() const
This is an important base class in LLVM.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
ConstantFP - Floating Point Values [float, double].
This class is intended to be used as a driving class for all asm writers.
This is the shared class of boolean and integer constants.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
A single location or constant.
void finalize(const AsmPrinter &AP, DebugLocStream::ListBuilder &List, const DIBasicType *BT)
Lower this entry into a DWARF expression.
bool isBitPiece() const
Return whether this is a piece of an aggregate variable.
bool all_of(R &&Range, UnaryPredicate &&P)
Provide wrappers to std::all_of which take ranges instead of having to pass being/end explicitly...
bool operator<(int64_t V1, const APSInt &V2)
uint64_t getBitPieceOffset() const
Return the offset of this piece in bits.
bool operator==(uint64_t V1, const APInt &V2)
bool isConstantFP() const
void addValues(ArrayRef< DebugLocEntry::Value > Vals)
union llvm::DebugLocEntry::Value::@199 Constant
Either a constant,.
Basic type, like 'int' or 'float'.