9 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H 10 #define LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H 13 #include "llvm/Config/llvm-config.h" 29 enum EntryType { E_Location, E_Integer, E_ConstantFP, E_ConstantInt };
30 enum EntryType EntryKind;
44 : Expression(Expr), EntryKind(E_Integer) {
48 : Expression(Expr), EntryKind(E_ConstantFP) {
52 : Expression(Expr), EntryKind(E_ConstantInt) {
56 : Expression(Expr), EntryKind(E_Location), Loc(Loc) {
57 assert(cast<DIExpression>(Expr)->isValid());
60 bool isLocation()
const {
return EntryKind == E_Location; }
61 bool isInt()
const {
return EntryKind == E_Integer; }
73 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 107 : Begin(Begin), End(End) {
117 if ((End == Next.Begin && Values == Next.Values)) {
132 })) &&
"must either have a single value or multiple pieces");
156 if (A.EntryKind != B.EntryKind)
159 if (A.Expression != B.Expression)
162 switch (A.EntryKind) {
163 case DbgValueLoc::E_Location:
164 return A.Loc == B.Loc;
165 case DbgValueLoc::E_Integer:
166 return A.Constant.
Int == B.Constant.
Int;
167 case DbgValueLoc::E_ConstantFP:
168 return A.Constant.
CFP == B.Constant.
CFP;
169 case DbgValueLoc::E_ConstantInt:
170 return A.Constant.
CIP == B.Constant.
CIP;
bool MergeRanges(const DebugLocEntry &Next)
Attempt to merge this DebugLocEntry with Next and return true if the merge was successful.
Builder for DebugLocStream lists.
bool isEntryValue() const
Check if the expression consists of exactly one entry value operand.
void addValues(ArrayRef< DbgValueLoc > Vals)
This struct describes location entries emitted in the .debug_loc section.
This class represents lattice values for constants.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
const ConstantFP * getConstantFP() const
friend bool operator==(const DbgValueLoc &, const DbgValueLoc &)
Compare two DbgValueLocs for equality.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
bool isConstantFP() const
DbgValueLoc(const DIExpression *Expr, int64_t i)
DebugLocEntry(const MCSymbol *Begin, const MCSymbol *End, ArrayRef< DbgValueLoc > Vals)
Create a location list entry for the range [Begin, End).
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly...
const ConstantInt * getConstantInt() const
void dump() const
Support for debugging, callable in GDB: V->dump()
const MCSymbol * getBeginSym() const
DbgValueLoc(const DIExpression *Expr, const ConstantFP *CFP)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static Optional< FragmentInfo > getFragmentInfo(expr_op_iterator Start, expr_op_iterator End)
Retrieve the details of this fragment expression.
DbgValueLoc(const DIExpression *Expr, const ConstantInt *CIP)
const DIExpression * getExpression() const
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
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.
LLVM_DUMP_METHOD void dump() const
iterator erase(const_iterator CI)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void sort(IteratorTy Start, IteratorTy End)
ArrayRef< DbgValueLoc > getValues() const
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...
friend bool operator<(const DbgValueLoc &, const DbgValueLoc &)
Compare two fragments based on their offset.
const MCSymbol * getEndSym() const
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void append(in_iter in_start, in_iter in_end)
Add the specified range to the end of the SmallVector.
MachineLocation getLoc() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isConstantInt() const
bool isFragment() const
Return whether this is a piece of an aggregate variable.
DbgValueLoc(const DIExpression *Expr, MachineLocation Loc)
A single location or constant.
Basic type, like 'int' or 'float'.