Changeset View
Changeset View
Standalone View
Standalone View
lib/CodeGen/AsmPrinter/DebugLocEntry.h
Context not available. | |||||
// Begin and end symbols for the address range that this location is valid. | // Begin and end symbols for the address range that this location is valid. | ||||
const MCSymbol *Begin; | const MCSymbol *Begin; | ||||
const MCSymbol *End; | const MCSymbol *End; | ||||
const Instruction *EndOfRange; | |||||
echristo: This appears unused. | |||||
public: | public: | ||||
/// A single location or constant. | /// A single location or constant. | ||||
Context not available. | |||||
}; | }; | ||||
private: | private: | ||||
/// A list of locations/constants belonging to this entry. | /// A list of locations/constants belonging to this entry. | ||||
SmallVector<Value, 1> Values; | SmallVector<Value, 2> Values; | ||||
/// The compile unit that this location entry is referenced by. | /// The compile unit that this location entry is referenced by. | ||||
const DwarfCompileUnit *Unit; | const DwarfCompileUnit *Unit; | ||||
Context not available. | |||||
/// share the same Loc/Constant and if Next immediately follows this | /// share the same Loc/Constant and if Next immediately follows this | ||||
/// Entry. | /// Entry. | ||||
bool Merge(const DebugLocEntry &Next) { | bool Merge(const DebugLocEntry &Next) { | ||||
if (Begin == Next.Begin) { | |||||
Values.append(Next.Values.begin(), Next.Values.end()); | |||||
Not Done ReplyInline ActionsDescription of the logic here? echristo: Description of the logic here? | |||||
End = Next.End; | |||||
return true; | |||||
} | |||||
if ((End == Next.Begin && Values == Next.Values)) { | if ((End == Next.Begin && Values == Next.Values)) { | ||||
End = Next.End; | End = Next.End; | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
/// \brief Truncate this DebugLocEntry at the symbol Sym and | |||||
/// return a new DebugLocEntry for the remainder. | |||||
DebugLocEntry SplitAt(const MCSymbol *Sym) | |||||
{ | |||||
assert(Sym != Begin && "attempting to split at begin"); | |||||
assert(Sym != End && "attempting to split at begin"); | |||||
DebugLocEntry Remainder = *this; | |||||
this->End = Sym; | |||||
Remainder.Begin = Sym; | |||||
return Remainder; | |||||
} | |||||
const MCSymbol *getBeginSym() const { return Begin; } | const MCSymbol *getBeginSym() const { return Begin; } | ||||
const MCSymbol *getEndSym() const { return End; } | const MCSymbol *getEndSym() const { return End; } | ||||
const Instruction *getEndOfRange() const { return EndOfRange; } | |||||
const DwarfCompileUnit *getCU() const { return Unit; } | const DwarfCompileUnit *getCU() const { return Unit; } | ||||
const ArrayRef<Value> getValues() const { return Values; } | const ArrayRef<Value> getValues() const { return Values; } | ||||
void addValue(Value Val) { Values.push_back(Val); } | void addValue(Value Val) { Values.push_back(Val); } | ||||
Context not available. |
This appears unused.