14#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVOBJECT_H
15#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVOBJECT_H
34namespace logicalview {
118 enum class Property {
148 } TagAttrOpcode = {dwarf::DW_TAG_null};
150 LVProperties<Property> Properties;
164 } Parent = {
nullptr};
171 LVObject(
const LVObject &Object) {
173 Properties = Object.Properties;
175 LineNumber = Object.LineNumber;
176 ScopeLevel = Object.ScopeLevel;
177 TagAttrOpcode = Object.TagAttrOpcode;
178 Parent = Object.Parent;
188 std::string lineAsString(uint32_t LineNumber, LVHalf Discriminator,
189 bool ShowZero)
const;
192 std::string referenceAsString(uint32_t LineNumber,
bool Spaces)
const;
225 virtual bool isNamed()
const {
return false; }
226 virtual bool isTyped()
const {
return false; }
227 virtual bool isFiled()
const {
return false; }
228 bool isLined()
const {
return LineNumber != 0; }
250 assert((!Parent.Element ||
static_cast<LVElement *
>(Parent.Element)) &&
252 return Parent.Element;
255 assert((!Parent.Scope ||
static_cast<LVScope *
>(Parent.Scope)) &&
260 assert((!Parent.Symbol ||
static_cast<LVSymbol *
>(Parent.Symbol)) &&
262 return Parent.Symbol;
264 void setParent(
LVScope *Scope);
276 virtual const char *
kind()
const {
return nullptr; }
278 std::string indentAsString()
const;
282 virtual std::string noLineAsString(
bool ShowZero)
const;
289 std::string lineNumberAsStringStripped(
bool ShowZero =
false)
const;
300 bool Full =
true)
const;
304 bool UseQuotes =
false,
bool PrintRef =
false)
const;
307 void markBranchAsMissing();
315#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static cl::opt< bool > PrintRef("print-ref", cl::ReallyHidden)
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.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
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.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
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()
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.