14#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVOBJECT_H
15#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVOBJECT_H
33namespace logicalview {
115 enum class Property {
145 } TagAttrOpcode = {dwarf::DW_TAG_null};
147 LVProperties<Property> Properties;
161 } Parent = {
nullptr};
168 LVObject(
const LVObject &Object) {
170 Properties = Object.Properties;
172 LineNumber = Object.LineNumber;
173 ScopeLevel = Object.ScopeLevel;
174 TagAttrOpcode = Object.TagAttrOpcode;
175 Parent = Object.Parent;
185 std::string lineAsString(uint32_t LineNumber, LVHalf Discriminator,
186 bool ShowZero)
const;
189 std::string referenceAsString(uint32_t LineNumber,
bool Spaces)
const;
222 virtual bool isNamed()
const {
return false; }
223 virtual bool isTyped()
const {
return false; }
224 virtual bool isFiled()
const {
return false; }
225 bool isLined()
const {
return LineNumber != 0; }
247 assert((!Parent.Element ||
static_cast<LVElement *
>(Parent.Element)) &&
249 return Parent.Element;
252 assert((!Parent.Scope ||
static_cast<LVScope *
>(Parent.Scope)) &&
257 assert((!Parent.Symbol ||
static_cast<LVSymbol *
>(Parent.Symbol)) &&
259 return Parent.Symbol;
261 void setParent(
LVScope *Scope);
273 virtual const char *
kind()
const {
return nullptr; }
275 std::string indentAsString()
const;
279 virtual std::string noLineAsString(
bool ShowZero)
const;
286 std::string lineNumberAsStringStripped(
bool ShowZero =
false)
const;
297 bool Full =
true)
const;
301 bool UseQuotes =
false,
bool PrintRef =
false)
const;
304 void markBranchAsMissing();
312#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
This file contains constants used for implementing Dwarf debug support.
Lightweight error class with error context and mandatory checking.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
LLVM Value Representation.
Helper to store a sequence of ranges being concatenated and access them.
PROPERTY(Property, IsDiscarded)
virtual StringRef getName() const
virtual bool isFiled() const
PROPERTY(Property, IsAdded)
virtual LVAddress getUpperAddress() const
PROPERTY(Property, IsGeneratedName)
virtual const char * kind() const
LVObject & operator=(const LVObject &)=delete
LVScope * getParentScope() const
dwarf::Tag getTag() const
LVSmall getOpcode() const
PROPERTY(Property, IsMissing)
std::string lineAsString(uint32_t LineNumber, LVHalf Discriminator, bool ShowZero) const
virtual void setLowerAddress(LVAddress Address)
void setLevel(LVLevel Level)
dwarf::Attribute getAttr() const
virtual std::string lineNumberAsString(bool ShowZero=false) const
virtual void setName(StringRef ObjectName)
void setOpcode(LVSmall Opcode)
PROPERTY(Property, IsLineFromReference)
virtual void printExtra(raw_ostream &OS, bool Full=true) const
PROPERTY(Property, IsMissingLink)
virtual bool isNamed() const
virtual bool isTyped() const
PROPERTY(Property, IsReferenced)
PROPERTY(Property, HasMoved)
PROPERTY(Property, IsResolvedName)
void setAttr(dwarf::Attribute Attr)
PROPERTY(Property, IsLocation)
virtual ~LVObject()=default
virtual void printFileIndex(raw_ostream &OS, bool Full=true) const
PROPERTY(Property, IsMatched)
PROPERTY(Property, HasPattern)
LVSymbol * getParentSymbol() const
uint32_t getLineNumber() const
PROPERTY(Property, IsResolved)
void setOffset(LVOffset DieOffset)
LVOffset getOffset() const
PROPERTY(Property, IsFinalized)
PROPERTY(Property, HasCodeViewLocation)
void setLineNumber(uint32_t Number)
LVElement * getParent() const
void setTag(dwarf::Tag Tag)
PROPERTY(Property, IsFileFromReference)
PROPERTY(Property, IsInCompare)
PROPERTY(Property, IsOptimized)
virtual void setUpperAddress(LVAddress Address)
virtual LVAddress getLowerAddress() const
PROPERTY(Property, IsGlobalReference)
This class implements an extremely fast bulk output stream that can only output to a stream.
Calculates the starting offsets for various sections within the .debug_names section.
constexpr Tag DW_TAG_unaligned
SmallVector< LVOperation *, 8 > LVOperations
bool(LVSymbol::*)() const LVSymbolGetFunction
SmallVector< LVOffset, 8 > LVOffsets
bool(LVType::*)() const LVTypeGetFunction
SmallVector< LVElement *, 8 > LVElements
void(LVLine::*)() LVLineSetFunction
bool(LVScope::*)() const LVScopeGetFunction
SmallVector< LVScope *, 8 > LVScopes
bool(LVLocation::*)() LVValidLocation
LLVM_ABI StringRef typeUnknown()
LLVM_ABI StringRef emptyString()
void(LVScope::*)() LVScopeSetFunction
LLVM_ABI StringRef typeNone()
detail::concat_range< LVElement *const, const LVScopes &, const LVTypes &, const LVSymbols & > LVElementsView
const LVAddress MaxAddress
SmallVector< LVSymbol *, 8 > LVSymbols
bool(LVLine::*)() const LVLineGetFunction
bool(LVElement::*)() const LVElementGetFunction
void(LVSymbol::*)() LVSymbolSetFunction
SmallVector< LVLine *, 8 > LVLines
LLVM_ABI StringRef typeInt()
bool(LVObject::*)() const LVObjectGetFunction
void(LVElement::*)() LVElementSetFunction
LLVM_ABI StringRef typeVoid()
void(LVType::*)() LVTypeSetFunction
SmallVector< LVType *, 8 > LVTypes
void(LVObject::*)() LVObjectSetFunction
SmallVector< LVLocation *, 8 > LVLocations
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.