LLVM: include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVSYMBOL_H
15#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVSYMBOL_H
16
19
20namespace llvm {
22
36
38 enum class Property { HasLocation, FillGaps, LastEntry };
39
40
44
45
46 size_t LinkageNameIndex = 0;
47
48
49 LVSymbol *Reference = nullptr;
50 std::unique_ptr Locations;
51 LVLocation *CurrentLocation = nullptr;
52
53
55
56
57 size_t ValueIndex = 0;
58
59
60 unsigned CoverageFactor = 0;
61 float CoveragePercentage = 0;
62
63
66
67
69
70public:
72 setIsSymbol();
73 setIncludeInPrint();
74 }
78
82
90
93
94 const char *kind() const override;
95
96
100 setHasReference();
101 }
106
114
117
118
126
127
133 bool CallSiteLocation = false);
134
135
136 void fillLocationGaps();
137
138
140 bool RecordInvalid = false);
141 void getLocations(LVLocations &LocationList) const;
142
143
144 void calculateCoverage();
145
150
151
152 void printLocations(raw_ostream &OS, bool Full = true) const;
153
154
155
156 StringRef resolveReferencesChain();
157
158 void resolveName() override;
159 void resolveReferences() override;
160
162
163 static bool parametersMatch(const LVSymbols *References,
165
167
168
169
170
171 static void markMissingParents(const LVSymbols *References,
173
174
175 bool equals(const LVSymbol *Symbol) const;
176
177
178
179 static bool equals(const LVSymbols *References, const LVSymbols *Targets);
180
181
183
185 void printExtra(raw_ostream &OS, bool Full = true) const override;
186};
187
188}
189}
190
191#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This is an important base class in LLVM.
Pass interface - Implemented by all 'passes'.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
LVElement(LVSubclassID ID)
void setBitSize(uint32_t Size) override
Definition LVSymbol.h:116
LVSymbol & operator=(const LVSymbol &)=delete
void setCoveragePercentage(float Value)
Definition LVSymbol.h:149
size_t getLinkageNameIndex() const override
Definition LVSymbol.h:113
LVSymbol(const LVSymbol &)=delete
PROPERTY(Property, FillGaps)
KIND(LVSymbolKind, IsUnspecified)
KIND(LVSymbolKind, IsCallSiteParameter)
KIND(LVSymbolKind, IsConstant)
float getCoveragePercentage() const
Definition LVSymbol.h:148
KIND(LVSymbolKind, IsInheritance)
StringRef getLinkageName() const override
Definition LVSymbol.h:110
KIND(LVSymbolKind, IsMember)
static LVSymbolDispatch & getDispatch()
Definition LVSymbol.h:161
StringRef getValue() const override
Definition LVSymbol.h:119
~LVSymbol() override=default
void setLinkageName(StringRef LinkageName) override
Definition LVSymbol.h:107
KIND(LVSymbolKind, IsParameter)
void setReference(LVElement *Element) override
Definition LVSymbol.h:102
static bool classof(const LVElement *Element)
Definition LVSymbol.h:79
PROPERTY(Property, HasLocation)
uint32_t getBitSize() const override
Definition LVSymbol.h:115
void setReference(LVSymbol *Symbol) override
Definition LVSymbol.h:98
void setCoverageFactor(unsigned Value)
Definition LVSymbol.h:147
const char * kind() const override
size_t getValueIndex() const override
Definition LVSymbol.h:125
LVSymbol * getReference() const
Definition LVSymbol.h:97
LVSymbol()
Definition LVSymbol.h:71
void setValue(StringRef Value) override
Definition LVSymbol.h:122
KIND(LVSymbolKind, IsVariable)
unsigned getCoverageFactor() const
Definition LVSymbol.h:146
This class implements an extremely fast bulk output stream that can only output to a stream.
std::set< LVSymbolKind > LVSymbolKindSet
Definition LVSymbol.h:33
LLVM_ABI LVStringPool & getStringPool()
std::map< LVSymbolKind, LVSymbolGetFunction > LVSymbolDispatch
Definition LVSymbol.h:34
std::vector< LVSymbolGetFunction > LVSymbolRequest
Definition LVSymbol.h:35
LVSymbolKind
Definition LVSymbol.h:23
@ IsCallSiteParameter
Definition LVSymbol.h:24
@ IsInheritance
Definition LVSymbol.h:26
@ IsVariable
Definition LVSymbol.h:30
@ IsUnspecified
Definition LVSymbol.h:29
bool(LVLocation::*)() LVValidLocation
SmallVector< LVSymbol *, 8 > LVSymbols
SmallVector< LVLocation *, 8 > LVLocations
This is an optimization pass for GlobalISel generic memory operations.
bool isa(const From &Val)
isa - Return true if the parameter to the template is an instance of one of the template type argu...