14#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVTYPE_H
15#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVTYPE_H
21namespace logicalview {
53 enum class Property { IsSubrangeCount,
LastEntry };
100 const char *kind()
const override;
106 bool isBase()
const override {
return getIsBase(); }
120 void resolveName()
override;
121 void resolveReferences()
override;
125 static bool parametersMatch(
const LVTypes *References,
128 static void getParameters(
const LVTypes *Types,
LVTypes *TypesParam,
134 static void markMissingParents(
const LVTypes *References,
138 virtual bool equals(
const LVType *
Type)
const;
142 static bool equals(
const LVTypes *References,
const LVTypes *Targets);
148 void printExtra(
raw_ostream &
OS,
bool Full =
true)
const override;
166 void resolveExtra()
override;
169 bool equals(
const LVType *
Type)
const override;
171 void printExtra(
raw_ostream &
OS,
bool Full =
true)
const override;
177 size_t ValueIndex = 0;
198 bool equals(
const LVType *
Type)
const override;
200 void printExtra(
raw_ostream &
OS,
bool Full =
true)
const override;
212 bool equals(
const LVType *
Type)
const override;
214 void printExtra(
raw_ostream &
OS,
bool Full =
true)
const override;
220 size_t ValueIndex = 0;
238 void encodeTemplateArgument(std::string &
Name)
const override;
241 bool equals(
const LVType *
Type)
const override;
243 void printExtra(
raw_ostream &
OS,
bool Full =
true)
const override;
249 int64_t LowerBound = 0;
250 int64_t UpperBound = 0;
262 return getIsSubrangeCount() ? LowerBound : 0;
266 setIsSubrangeCount();
275 std::pair<unsigned, unsigned>
getBounds()
const override {
276 return {LowerBound, UpperBound};
278 void setBounds(
unsigned Lower,
unsigned Upper)
override {
283 void resolveExtra()
override;
286 bool equals(
const LVType *
Type)
const override;
288 void printExtra(
raw_ostream &
OS,
bool Full =
true)
const override;
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
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.
LVSubclassID getSubclassID() const
StringRef getString(size_t Index) const
size_t getIndex(StringRef Key)
~LVTypeDefinition()=default
void setUnderlyingType(LVElement *Element) override
LVTypeDefinition & operator=(const LVTypeDefinition &)=delete
LVTypeDefinition(const LVTypeDefinition &)=delete
size_t getValueIndex() const override
void setValue(StringRef Value) override
LVTypeEnumerator(const LVTypeEnumerator &)=delete
StringRef getValue() const override
~LVTypeEnumerator()=default
LVTypeEnumerator & operator=(const LVTypeEnumerator &)=delete
LVTypeImport(const LVTypeImport &)=delete
LVTypeImport & operator=(const LVTypeImport &)=delete
LVTypeParam(const LVTypeParam &)=delete
size_t getValueIndex() const override
void setValue(StringRef Value) override
LVTypeParam & operator=(const LVTypeParam &)=delete
StringRef getValue() const override
~LVTypeSubrange()=default
LVTypeSubrange & operator=(const LVTypeSubrange &)=delete
LVTypeSubrange(const LVTypeSubrange &)=delete
void setLowerBound(int64_t Value) override
void setUpperBound(int64_t Value) override
void setBounds(unsigned Lower, unsigned Upper) override
std::pair< unsigned, unsigned > getBounds() const override
int64_t getUpperBound() const override
void setCount(int64_t Value) override
int64_t getCount() const override
int64_t getLowerBound() const override
KIND(LVTypeKind, IsRvalueReference)
KIND(LVTypeKind, IsTemplateParam)
KIND_1(LVTypeKind, IsImportModule, IsImport)
KIND(LVTypeKind, IsEnumerator)
virtual ~LVType()=default
KIND(LVTypeKind, IsUnspecified)
KIND(LVTypeKind, IsRestrict)
KIND(LVTypeKind, IsConst)
LVType(const LVType &)=delete
void setBitSize(uint32_t Size) override
KIND(LVTypeKind, IsTypedef)
KIND(LVTypeKind, IsReference)
static LVTypeDispatch & getDispatch()
KIND(LVTypeKind, IsPointer)
KIND_1(LVTypeKind, IsImportDeclaration, IsImport)
PROPERTY(Property, IsSubrangeCount)
KIND(LVTypeKind, IsVolatile)
LVType & operator=(const LVType &)=delete
uint32_t getBitSize() const override
bool isBase() const override
KIND(LVTypeKind, IsModifier)
KIND(LVTypeKind, IsImport)
virtual void encodeTemplateArgument(std::string &Name) const
virtual void setUnderlyingType(LVElement *Element)
KIND_1(LVTypeKind, IsTemplateTemplateParam, IsTemplateParam)
virtual LVElement * getUnderlyingType()
KIND(LVTypeKind, IsPointerMember)
KIND(LVTypeKind, IsUnaligned)
bool isTemplateParam() const override
static bool classof(const LVElement *Element)
KIND(LVTypeKind, IsSubrange)
KIND_1(LVTypeKind, IsTemplateValueParam, IsTemplateParam)
KIND_1(LVTypeKind, IsTemplateTypeParam, IsTemplateParam)
This class implements an extremely fast bulk output stream that can only output to a stream.
LLVM_ABI LVStringPool & getStringPool()
std::set< LVTypeKind > LVTypeKindSelection
@ IsTemplateTemplateParam
std::map< LVTypeKind, LVTypeGetFunction > LVTypeDispatch
std::vector< LVTypeGetFunction > LVTypeRequest
This is an optimization pass for GlobalISel generic memory operations.