14#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVOBJECT_H
15#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVOBJECT_H
34namespace logicalview {
120 enum class Property {
150 } TagAttrOpcode = {dwarf::DW_TAG_null};
152 LVProperties<Property> Properties;
166 } Parent = {
nullptr};
173 LVObject(
const LVObject &Object) {
175 Properties = Object.Properties;
177 LineNumber = Object.LineNumber;
178 ScopeLevel = Object.ScopeLevel;
179 TagAttrOpcode = Object.TagAttrOpcode;
180 Parent = Object.Parent;
190 std::string lineAsString(uint32_t LineNumber, LVHalf Discriminator,
191 bool ShowZero)
const;
194 std::string referenceAsString(uint32_t LineNumber,
bool Spaces)
const;
227 virtual bool isNamed()
const {
return false; }
228 virtual bool isTyped()
const {
return false; }
229 virtual bool isFiled()
const {
return false; }
230 bool isLined()
const {
return LineNumber != 0; }
252 assert((!Parent.Element ||
static_cast<LVElement *
>(Parent.Element)) &&
254 return Parent.Element;
257 assert((!Parent.Scope ||
static_cast<LVScope *
>(Parent.Scope)) &&
262 assert((!Parent.Symbol ||
static_cast<LVSymbol *
>(Parent.Symbol)) &&
264 return Parent.Symbol;
266 void setParent(
LVScope *Scope);
278 virtual const char *
kind()
const {
return nullptr; }
280 std::string indentAsString()
const;
284 virtual std::string noLineAsString(
bool ShowZero)
const;
291 std::string lineNumberAsStringStripped(
bool ShowZero =
false)
const;
302 bool Full =
true)
const;
306 bool UseQuotes =
false,
bool PrintRef =
false)
const;
309 void markBranchAsMissing();
317#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.
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.
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()
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.