14#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVELEMENT_H
15#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVELEMENT_H
87 IsMemberPointerResolved,
94 HasReferenceExtension,
95 HasReferenceSpecification,
113 size_t NameIndex = 0;
114 size_t QualifiedNameIndex = 0;
115 size_t FilenameIndex = 0;
128 void setFileLine(
LVElement *Specification);
131 void resolveQualifiedName();
142 : LVObject(), SubclassID(ID), AccessibilityCode(0), InlineCode(0),
182 bool isNamed()
const override {
return NameIndex != 0; }
184 bool isFiled()
const override {
return FilenameIndex != 0; }
195 void setName(
StringRef ElementName)
override;
229 virtual bool isRoot()
const {
return false; }
250 virtual bool isBase()
const {
return false; }
265 virtual std::pair<unsigned, unsigned>
getBounds()
const {
return {}; }
287 AccessibilityCode =
Code.value();
299 virtualityString(
uint32_t Virtuality = dwarf::DW_VIRTUALITY_none)
const;
305 VirtualityCode =
Code.value();
312 LVType *getTypeAsType()
const;
313 LVScope *getTypeAsScope()
const;
319 Element->setIsReferencedType();
331 std::string typeOffsetAsString()
const;
332 std::string discriminatorAsString()
const;
336 LVScope *getFunctionParent()
const;
337 virtual LVScope *getCompileUnitParent()
const;
351 void generateName(std::string &Prefix)
const;
355 virtual void updateLevel(
LVScope *Parent,
bool Moved =
false);
363 virtual void resolve();
365 virtual void resolveName();
367 void resolveParents();
369 bool referenceMatch(
const LVElement *Element)
const;
372 bool equals(
const LVElement *Element)
const;
static std::string getTypeName(OverloadKind Kind, Type *Ty)
static StringRef getName(Value *V)
BaseType
A given derived pointer can have multiple base pointers through phi/selects.
Pass interface - Implemented by all 'passes'.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
PROPERTY(Property, IsTypedefReduced)
virtual void setCount(int64_t Value)
size_t getNameIndex() const
PROPERTY(Property, IsEnumClass)
void setAccessibilityCode(codeview::MemberAccess Access)
PROPERTY(Property, IsScoped)
virtual void setCallLineNumber(uint32_t Number)
PROPERTY(Property, HasReferenceSpecification)
virtual bool isTemplateParam() const
StringRef getQualifiedName() const
virtual void setReference(LVScope *Scope)
PROPERTY(Property, IsType)
virtual ~LVElement()=default
virtual void setReference(LVSymbol *Symbol)
PROPERTY(Property, IsMemberPointerResolved)
virtual void setBitSize(uint32_t Size)
PROPERTY(Property, IsInlinedAbstract)
virtual void setLinkageName(StringRef LinkageName)
virtual void setProducer(StringRef ProducerName)
static LVElementDispatch & getDispatch()
virtual void setUpperBound(int64_t Value)
virtual void setDiscriminator(uint32_t Value)
virtual bool isRoot() const
virtual size_t getCallFilenameIndex() const
virtual void setLowerBound(int64_t Value)
LVElement(LVSubclassID ID)
virtual int64_t getCount() const
LVElement(const LVElement &)=delete
bool isFiled() const override
uint32_t getInlineCode() const
virtual uint32_t getDiscriminator() const
virtual StringRef getValue() const
virtual bool isBase() const
virtual void setValue(StringRef Value)
void setInlineCode(uint32_t Code)
void setQualifiedName(StringRef Name)
PROPERTY(Property, InvalidFilename)
virtual void setReference(LVElement *Element)
bool getIsKindScope() const
PROPERTY(Property, IsLine)
PROPERTY(Property, HasAugmentedName)
virtual StringRef getLinkageName() const
virtual bool isCompileUnit() const
virtual size_t getValueIndex() const
PROPERTY(Property, IsSymbol)
PROPERTY(Property, HasReferenceExtension)
StringRef getName() const override
virtual int64_t getUpperBound() const
PROPERTY(Property, HasReference)
LVElement & operator=(const LVElement &)=delete
LVElement * getType() const
PROPERTY(Property, IsStatic)
PROPERTY(Property, IsArrayResolved)
virtual StringRef getProducer() const
PROPERTY(Property, IsAnonymous)
PROPERTY(Property, IsInlined)
void setAccessibilityCode(uint32_t Access)
virtual uint32_t getCallLineNumber() const
uint32_t getAccessibilityCode() const
PROPERTY(Property, IsNested)
virtual uint32_t getBitSize() const
PROPERTY(Property, HasType)
void setVirtualityCode(uint32_t Virtuality)
virtual void setReference(LVType *Type)
void setType(LVElement *Element=nullptr)
StringRef getTypeQualifiedName() const
PROPERTY(Property, IsReferencedType)
virtual void report(LVComparePass Pass)
PROPERTY(Property, IsSystem)
virtual int64_t getLowerBound() const
PROPERTY(Property, IsArtificial)
bool getIsKindType() const
void setFilenameIndex(size_t Index)
PROPERTY(Property, IncludeInPrint)
virtual std::pair< unsigned, unsigned > getBounds() const
uint32_t getVirtualityCode() const
PROPERTY(Property, QualifiedResolved)
size_t getFilenameIndex() const
bool isTyped() const override
void printFileIndex(raw_ostream &OS, bool Full=true) const override
virtual void setSourceLanguage(LVSourceLanguage SL)
PROPERTY(Property, HasReferenceAbstract)
virtual void setCallFilenameIndex(size_t Index)
StringRef getPathname() const
PROPERTY(Property, IsScope)
size_t getQualifiedNameIndex() const
virtual bool removeElement(LVElement *Element)
PROPERTY(Property, IsExternal)
void setVirtualityCode(codeview::MethodKind Virtuality)
virtual LVSourceLanguage getSourceLanguage() const
PROPERTY(Property, OffsetFromTypeIndex)
virtual size_t getLinkageNameIndex() const
PROPERTY(Property, TransformName)
PROPERTY(Property, IsScopedAlready)
uint32_t getStorageSizeInBytes() const
LVSubclassID getSubclassID() const
bool isNamed() const override
virtual void resolveExtra()
virtual void setBounds(unsigned Lower, unsigned Upper)
PROPERTY(Property, IsTemplateResolved)
virtual void resolveReferences()
This class implements an extremely fast bulk output stream that can only output to a stream.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
MemberAccess
Source-level access specifier. (CV_access_e)
LLVM_ABI LVStringPool & getStringPool()
bool(LVScope::*)() const LVScopeGetFunction
std::vector< LVElementGetFunction > LVElementRequest
LLVM_ABI StringRef emptyString()
constexpr unsigned int DWARF_CHAR_BIT
@ LV_SCOPE_FUNCTION_INLINED
std::map< LVElementKind, LVElementGetFunction > LVElementDispatch
std::set< LVElementKind > LVElementKindSet
This is an optimization pass for GlobalISel generic memory operations.
constexpr T divideCeil(U Numerator, V Denominator)
Returns the integer ceil(Numerator / Denominator).
A source language supported by any of the debug info representations.