Go to the documentation of this file.
46 #define TYPE_RECORD(EnumName, EnumVal, Name) \
47 Error visitKnownRecord(CVType &CVR, Name##Record &Record) override;
48 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
49 #define MEMBER_RECORD(EnumName, EnumVal, Name)
50 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
62 CurrentTypeIndex =
Index;
70 Name =
"<field list>";
81 auto Indices =
Args.getIndices();
85 if (Indices[
I] < CurrentTypeIndex)
86 Name.append(Types.getTypeName(Indices[
I]));
88 Name.append(
"<unknown 0x" + utohexstr(Indices[
I].getIndex()) +
">");
98 auto Indices = Strings.getIndices();
102 Name.append(Types.getTypeName(Indices[
I]));
104 Name.append(
"\" \"");
106 Name.push_back(
'\"');
187 Name.append(
" const");
189 Name.append(
" volatile");
191 Name.append(
" __unaligned");
193 Name.append(
" __restrict");
202 Name.append(
"const ");
204 Name.append(
"volatile ");
206 Name.append(
"__unaligned ");
207 Name.append(Types.getTypeName(
Mod.getModifiedType()));
256 TypeNameComputer Computer(Types);
260 return "<unknown UDT>";
262 return std::string(Computer.name());
266 switch (Sym.
kind()) {
268 case SymbolKind::S_GPROC32:
269 case SymbolKind::S_LPROC32:
270 case SymbolKind::S_GPROC32_ID:
271 case SymbolKind::S_LPROC32_ID:
272 case SymbolKind::S_LPROC32_DPC:
273 case SymbolKind::S_LPROC32_DPC_ID:
276 case SymbolKind::S_THUNK32:
279 case SymbolKind::S_SECTION:
282 case SymbolKind::S_COFFGROUP:
285 case SymbolKind::S_PUB32:
286 case SymbolKind::S_FILESTATIC:
287 case SymbolKind::S_REGREL32:
288 case SymbolKind::S_GDATA32:
289 case SymbolKind::S_LDATA32:
290 case SymbolKind::S_LMANDATA:
291 case SymbolKind::S_GMANDATA:
292 case SymbolKind::S_LTHREAD32:
293 case SymbolKind::S_GTHREAD32:
294 case SymbolKind::S_PROCREF:
295 case SymbolKind::S_LPROCREF:
298 case SymbolKind::S_REGISTER:
299 case SymbolKind::S_LOCAL:
302 case SymbolKind::S_BLOCK32:
305 case SymbolKind::S_LABEL32:
308 case SymbolKind::S_OBJNAME:
309 case SymbolKind::S_EXPORT:
310 case SymbolKind::S_UDT:
313 case SymbolKind::S_BPREL32:
316 case SymbolKind::S_UNAMESPACE:
324 if (Sym.
kind() == SymbolKind::S_CONSTANT) {
342 return StringData.
split(
'\0').first;
This is an optimization pass for GlobalISel generic memory operations.
std::string computeTypeName(TypeCollection &Types, TypeIndex Index)
uint32_t getEntryCount() const
static ErrorSuccess success()
Create a success value.
TypeIndex getReferentType() const
TypeIndex getArgumentList() const
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
void consumeError(Error Err)
Consume a Error without doing anything.
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
TypeIndex getReturnType() const
TypeIndex getReturnType() const
TypeIndex getArgumentList() const
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
Error visitSymbolEnd(CVSymbol &Record) override
TypeIndex getClassType() const
StringRef toStringRef(const Optional< DWARFFormValue > &V, StringRef Default={})
Take an optional DWARFFormValue and try to extract a string value from it.
virtual CVType getType(TypeIndex Index)=0
StringRef getName() const
Error visitTypeRecord(CVType &Record, TypeIndex Index, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
Provides read only access to a subclass of BinaryStream.
PointerMode getMode() const
StringRef getName() const
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
static int getSymbolNameOffset(CVSymbol Sym)
Error visitSymbolBegin(CVSymbol &Record) override
ArrayRef< uint8_t > content() const
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
LLVM_NODISCARD StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
Lightweight error class with error context and mandatory checking.
bool isPointerToMember() const
StringRef getSymbolName(CVSymbol Sym)
MemberPointerInfo getMemberInfo() const
StringRef getName() const
constexpr char Args[]
Key for Kernel::Metadata::mArgs.