LLVM  14.0.0git
TypeDumpVisitor.cpp
Go to the documentation of this file.
1 //===-- TypeDumpVisitor.cpp - CodeView type info dumper ----------*- C++-*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
11 #include "llvm/ADT/SmallString.h"
19 
20 using namespace llvm;
21 using namespace llvm::codeview;
22 
24 #define CV_TYPE(enum, val) {#enum, enum},
25 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
26 };
27 
28 #define ENUM_ENTRY(enum_class, enum) \
29  { #enum, std::underlying_type < enum_class > ::type(enum_class::enum) }
30 
44 };
45 
49 };
50 
52  ENUM_ENTRY(MethodOptions, Pseudo),
57 };
58 
62  ENUM_ENTRY(MethodKind, Static),
67 };
68 
69 static const EnumEntry<uint8_t> PtrKindNames[] = {
83 };
84 
85 static const EnumEntry<uint8_t> PtrModeNames[] = {
91 };
92 
103 };
104 
108 };
109 
135 };
136 
141 };
142 
145 };
146 
147 #undef ENUM_ENTRY
148 
150  switch (LT) {
151 #define TYPE_RECORD(ename, value, name) \
152  case ename: \
153  return #name;
154 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
155  default:
156  break;
157  }
158  return "UnknownLeaf";
159 }
160 
162  codeview::printTypeIndex(*W, FieldName, TI, TpiTypes);
163 }
164 
166  codeview::printTypeIndex(*W, FieldName, TI, getSourceTypes());
167 }
168 
171 }
172 
174  W->startLine() << getLeafTypeName(Record.kind());
175  W->getOStream() << " (" << HexNumber(Index.getIndex()) << ")";
176  W->getOStream() << " {\n";
177  W->indent();
178  W->printEnum("TypeLeafKind", unsigned(Record.kind()),
180  return Error::success();
181 }
182 
184  if (PrintRecordBytes)
185  W->printBinaryBlock("LeafData", getBytesAsCharacters(Record.content()));
186 
187  W->unindent();
188  W->startLine() << "}\n";
189  return Error::success();
190 }
191 
193  W->startLine() << getLeafTypeName(Record.Kind);
194  W->getOStream() << " {\n";
195  W->indent();
196  W->printEnum("TypeLeafKind", unsigned(Record.Kind),
198  return Error::success();
199 }
200 
202  if (PrintRecordBytes)
203  W->printBinaryBlock("LeafData", getBytesAsCharacters(Record.Data));
204 
205  W->unindent();
206  W->startLine() << "}\n";
207  return Error::success();
208 }
209 
211  FieldListRecord &FieldList) {
212  if (auto EC = codeview::visitMemberRecordStream(FieldList.Data, *this))
213  return EC;
214 
215  return Error::success();
216 }
217 
219  printItemIndex("Id", String.getId());
220  W->printString("StringData", String.getString());
221  return Error::success();
222 }
223 
225  auto Indices = Args.getIndices();
226  uint32_t Size = Indices.size();
227  W->printNumber("NumArgs", Size);
228  ListScope Arguments(*W, "Arguments");
229  for (uint32_t I = 0; I < Size; ++I) {
230  printTypeIndex("ArgType", Indices[I]);
231  }
232  return Error::success();
233 }
234 
236  auto Indices = Strs.getIndices();
237  uint32_t Size = Indices.size();
238  W->printNumber("NumStrings", Size);
239  ListScope Arguments(*W, "Strings");
240  for (uint32_t I = 0; I < Size; ++I) {
241  printItemIndex("String", Indices[I]);
242  }
243  return Error::success();
244 }
245 
247  uint16_t Props = static_cast<uint16_t>(Class.getOptions());
248  W->printNumber("MemberCount", Class.getMemberCount());
249  W->printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
250  printTypeIndex("FieldList", Class.getFieldList());
251  printTypeIndex("DerivedFrom", Class.getDerivationList());
252  printTypeIndex("VShape", Class.getVTableShape());
253  W->printNumber("SizeOf", Class.getSize());
254  W->printString("Name", Class.getName());
256  W->printString("LinkageName", Class.getUniqueName());
257  return Error::success();
258 }
259 
261  uint16_t Props = static_cast<uint16_t>(Union.getOptions());
262  W->printNumber("MemberCount", Union.getMemberCount());
263  W->printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
264  printTypeIndex("FieldList", Union.getFieldList());
265  W->printNumber("SizeOf", Union.getSize());
266  W->printString("Name", Union.getName());
268  W->printString("LinkageName", Union.getUniqueName());
269  return Error::success();
270 }
271 
273  uint16_t Props = static_cast<uint16_t>(Enum.getOptions());
274  W->printNumber("NumEnumerators", Enum.getMemberCount());
275  W->printFlags("Properties", uint16_t(Enum.getOptions()),
277  printTypeIndex("UnderlyingType", Enum.getUnderlyingType());
278  printTypeIndex("FieldListType", Enum.getFieldList());
279  W->printString("Name", Enum.getName());
281  W->printString("LinkageName", Enum.getUniqueName());
282  return Error::success();
283 }
284 
286  printTypeIndex("ElementType", AT.getElementType());
287  printTypeIndex("IndexType", AT.getIndexType());
288  W->printNumber("SizeOf", AT.getSize());
289  W->printString("Name", AT.getName());
290  return Error::success();
291 }
292 
294  printTypeIndex("CompleteClass", VFT.getCompleteClass());
295  printTypeIndex("OverriddenVFTable", VFT.getOverriddenVTable());
296  W->printHex("VFPtrOffset", VFT.getVFPtrOffset());
297  W->printString("VFTableName", VFT.getName());
298  for (auto N : VFT.getMethodNames())
299  W->printString("MethodName", N);
300  return Error::success();
301 }
302 
304  printTypeIndex("ClassType", Id.getClassType());
305  printTypeIndex("FunctionType", Id.getFunctionType());
306  W->printString("Name", Id.getName());
307  return Error::success();
308 }
309 
311  printTypeIndex("ReturnType", Proc.getReturnType());
312  W->printEnum("CallingConvention", uint8_t(Proc.getCallConv()),
314  W->printFlags("FunctionOptions", uint8_t(Proc.getOptions()),
316  W->printNumber("NumParameters", Proc.getParameterCount());
317  printTypeIndex("ArgListType", Proc.getArgumentList());
318  return Error::success();
319 }
320 
322  printTypeIndex("ReturnType", MF.getReturnType());
323  printTypeIndex("ClassType", MF.getClassType());
324  printTypeIndex("ThisType", MF.getThisType());
325  W->printEnum("CallingConvention", uint8_t(MF.getCallConv()),
327  W->printFlags("FunctionOptions", uint8_t(MF.getOptions()),
329  W->printNumber("NumParameters", MF.getParameterCount());
330  printTypeIndex("ArgListType", MF.getArgumentList());
331  W->printNumber("ThisAdjustment", MF.getThisPointerAdjustment());
332  return Error::success();
333 }
334 
336  MethodOverloadListRecord &MethodList) {
337  for (auto &M : MethodList.getMethods()) {
338  ListScope S(*W, "Method");
339  printMemberAttributes(M.getAccess(), M.getMethodKind(), M.getOptions());
340  printTypeIndex("Type", M.getType());
341  if (M.isIntroducingVirtual())
342  W->printHex("VFTableOffset", M.getVFTableOffset());
343  }
344  return Error::success();
345 }
346 
348  printItemIndex("ParentScope", Func.getParentScope());
349  printTypeIndex("FunctionType", Func.getFunctionType());
350  W->printString("Name", Func.getName());
351  return Error::success();
352 }
353 
355  W->printString("Guid", formatv("{0}", TS.getGuid()).str());
356  W->printNumber("Age", TS.getAge());
357  W->printString("Name", TS.getName());
358  return Error::success();
359 }
360 
362  printTypeIndex("PointeeType", Ptr.getReferentType());
363  W->printEnum("PtrType", unsigned(Ptr.getPointerKind()),
365  W->printEnum("PtrMode", unsigned(Ptr.getMode()), makeArrayRef(PtrModeNames));
366 
367  W->printNumber("IsFlat", Ptr.isFlat());
368  W->printNumber("IsConst", Ptr.isConst());
369  W->printNumber("IsVolatile", Ptr.isVolatile());
370  W->printNumber("IsUnaligned", Ptr.isUnaligned());
371  W->printNumber("IsRestrict", Ptr.isRestrict());
372  W->printNumber("IsThisPtr&", Ptr.isLValueReferenceThisPtr());
373  W->printNumber("IsThisPtr&&", Ptr.isRValueReferenceThisPtr());
374  W->printNumber("SizeOf", Ptr.getSize());
375 
376  if (Ptr.isPointerToMember()) {
377  const MemberPointerInfo &MI = Ptr.getMemberInfo();
378 
379  printTypeIndex("ClassType", MI.getContainingType());
380  W->printEnum("Representation", uint16_t(MI.getRepresentation()),
382  }
383 
384  return Error::success();
385 }
386 
388  uint16_t Mods = static_cast<uint16_t>(Mod.getModifiers());
389  printTypeIndex("ModifiedType", Mod.getModifiedType());
390  W->printFlags("Modifiers", Mods, makeArrayRef(TypeModifierNames));
391 
392  return Error::success();
393 }
394 
396  printTypeIndex("Type", BitField.getType());
397  W->printNumber("BitSize", BitField.getBitSize());
398  W->printNumber("BitOffset", BitField.getBitOffset());
399  return Error::success();
400 }
401 
403  VFTableShapeRecord &Shape) {
404  W->printNumber("VFEntryCount", Shape.getEntryCount());
405  return Error::success();
406 }
407 
410  printTypeIndex("UDT", Line.getUDT());
411  printItemIndex("SourceFile", Line.getSourceFile());
412  W->printNumber("LineNumber", Line.getLineNumber());
413  return Error::success();
414 }
415 
418  printTypeIndex("UDT", Line.getUDT());
419  printItemIndex("SourceFile", Line.getSourceFile());
420  W->printNumber("LineNumber", Line.getLineNumber());
421  W->printNumber("Module", Line.getModule());
422  return Error::success();
423 }
424 
426  W->printNumber("NumArgs", static_cast<uint32_t>(Args.getArgs().size()));
427 
428  ListScope Arguments(*W, "Arguments");
429  for (auto Arg : Args.getArgs()) {
430  printItemIndex("ArgType", Arg);
431  }
432  return Error::success();
433 }
434 
435 void TypeDumpVisitor::printMemberAttributes(MemberAttributes Attrs) {
436  return printMemberAttributes(Attrs.getAccess(), Attrs.getMethodKind(),
437  Attrs.getFlags());
438 }
439 
440 void TypeDumpVisitor::printMemberAttributes(MemberAccess Access,
443  W->printEnum("AccessSpecifier", uint8_t(Access),
445  // Data members will be vanilla. Don't try to print a method kind for them.
446  if (Kind != MethodKind::Vanilla)
447  W->printEnum("MethodKind", unsigned(Kind), makeArrayRef(MemberKindNames));
448  if (Options != MethodOptions::None) {
449  W->printFlags("MethodOptions", unsigned(Options),
451  }
452 }
453 
455  W->printHex("UnknownMember", unsigned(Record.Kind));
456  return Error::success();
457 }
458 
460  W->printEnum("Kind", uint16_t(Record.kind()), makeArrayRef(LeafTypeNames));
461  W->printNumber("Length", uint32_t(Record.content().size()));
462  return Error::success();
463 }
464 
466  NestedTypeRecord &Nested) {
467  printTypeIndex("Type", Nested.getNestedType());
468  W->printString("Name", Nested.getName());
469  return Error::success();
470 }
471 
473  OneMethodRecord &Method) {
474  MethodKind K = Method.getMethodKind();
475  printMemberAttributes(Method.getAccess(), K, Method.getOptions());
476  printTypeIndex("Type", Method.getType());
477  // If virtual, then read the vftable offset.
478  if (Method.isIntroducingVirtual())
479  W->printHex("VFTableOffset", Method.getVFTableOffset());
480  W->printString("Name", Method.getName());
481  return Error::success();
482 }
483 
485  OverloadedMethodRecord &Method) {
486  W->printHex("MethodCount", Method.getNumOverloads());
487  printTypeIndex("MethodListIndex", Method.getMethodList());
488  W->printString("Name", Method.getName());
489  return Error::success();
490 }
491 
494  printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
496  printTypeIndex("Type", Field.getType());
497  W->printHex("FieldOffset", Field.getFieldOffset());
498  W->printString("Name", Field.getName());
499  return Error::success();
500 }
501 
504  printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
506  printTypeIndex("Type", Field.getType());
507  W->printString("Name", Field.getName());
508  return Error::success();
509 }
510 
512  VFPtrRecord &VFTable) {
513  printTypeIndex("Type", VFTable.getType());
514  return Error::success();
515 }
516 
518  EnumeratorRecord &Enum) {
519  printMemberAttributes(Enum.getAccess(), MethodKind::Vanilla,
521  W->printNumber("EnumValue", Enum.getValue());
522  W->printString("Name", Enum.getName());
523  return Error::success();
524 }
525 
528  printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
530  printTypeIndex("BaseType", Base.getBaseType());
531  W->printHex("BaseOffset", Base.getBaseOffset());
532  return Error::success();
533 }
534 
537  printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
539  printTypeIndex("BaseType", Base.getBaseType());
540  printTypeIndex("VBPtrType", Base.getVBPtrType());
541  W->printHex("VBPtrOffset", Base.getVBPtrOffset());
542  W->printHex("VBTableIndex", Base.getVTableIndex());
543  return Error::success();
544 }
545 
547  ListContinuationRecord &Cont) {
548  printTypeIndex("ContinuationIndex", Cont.getContinuationIndex());
549  return Error::success();
550 }
551 
554  return Error::success();
555 }
556 
558  PrecompRecord &Precomp) {
559  W->printHex("StartIndex", Precomp.getStartTypeIndex());
560  W->printHex("Count", Precomp.getTypesCount());
561  W->printHex("Signature", Precomp.getSignature());
562  W->printString("PrecompFile", Precomp.getPrecompFilePath());
563  return Error::success();
564 }
565 
567  EndPrecompRecord &EndPrecomp) {
568  W->printHex("Signature", EndPrecomp.getSignature());
569  return Error::success();
570 }
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm::codeview::VFTableRecord::getOverriddenVTable
TypeIndex getOverriddenVTable() const
Definition: TypeRecord.h:704
llvm::codeview::PointerRecord::isFlat
bool isFlat() const
Definition: TypeRecord.h:324
llvm::codeview::ClassOptions::ForwardReference
@ ForwardReference
Attrs
Function Attrs
Definition: README_ALTIVEC.txt:215
llvm::codeview::MemberAccess
MemberAccess
Source-level access specifier. (CV_access_e)
Definition: CodeView.h:263
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::codeview::ListContinuationRecord::getContinuationIndex
TypeIndex getContinuationIndex() const
Definition: TypeRecord.h:922
llvm::codeview::MethodOverloadListRecord::getMethods
ArrayRef< OneMethodRecord > getMethods() const
Definition: TypeRecord.h:758
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::codeview::ProcedureRecord::getCallConv
CallingConvention getCallConv() const
Definition: TypeRecord.h:157
llvm::codeview::VFTableShapeRecord::getEntryCount
uint32_t getEntryCount() const
Definition: TypeRecord.h:567
llvm::codeview::PrecompRecord::getTypesCount
uint32_t getTypesCount() const
Definition: TypeRecord.h:934
llvm::codeview::TypeServer2Record::getGuid
const GUID & getGuid() const
Definition: TypeRecord.h:584
llvm::codeview::VFPtrRecord::getType
TypeIndex getType() const
Definition: TypeRecord.h:857
llvm::ScopedPrinter::getOStream
raw_ostream & getOStream()
Definition: ScopedPrinter.h:327
llvm::codeview::MethodKind::PureVirtual
@ PureVirtual
llvm::codeview::LabelType::Far
@ Far
llvm::codeview::ModifierOptions
ModifierOptions
Equivalent to CV_modifier_t.
Definition: CodeView.h:302
llvm::codeview::StringIdRecord
Definition: TypeRecord.h:594
llvm::codeview::MethodOptions::NoInherit
@ NoInherit
llvm::codeview::NestedTypeRecord
Definition: TypeRecord.h:369
llvm::codeview::PointerKind::BasedOnSegmentAddress
@ BasedOnSegmentAddress
llvm::codeview::ClassOptions::HasConstructorOrDestructor
@ HasConstructorOrDestructor
llvm::codeview::FunctionOptions
FunctionOptions
Definition: CodeView.h:247
llvm::codeview::PointerRecord::isVolatile
bool isVolatile() const
Definition: TypeRecord.h:327
llvm::codeview::CallingConvention::AlphaCall
@ AlphaCall
llvm::codeview::Line
Definition: Line.h:91
llvm::codeview::CallingConvention::AM33Call
@ AM33Call
llvm::ScopedPrinter::printString
void printString(StringRef Value)
Definition: ScopedPrinter.h:258
llvm::codeview::CallingConvention::ThisCall
@ ThisCall
llvm::codeview::TypeIndex::fromArrayIndex
static TypeIndex fromArrayIndex(uint32_t Index)
Definition: TypeIndex.h:123
llvm::codeview::VFTableRecord::getMethodNames
ArrayRef< StringRef > getMethodNames() const
Definition: TypeRecord.h:708
llvm::codeview::PointerToMemberRepresentation::VirtualInheritanceData
@ VirtualInheritanceData
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition: Error.h:331
llvm::codeview::PointerToMemberRepresentation::GeneralData
@ GeneralData
llvm::codeview::MemberAccess::Protected
@ Protected
TypeModifierNames
static const EnumEntry< uint16_t > TypeModifierNames[]
Definition: TypeDumpVisitor.cpp:105
llvm::codeview::PrecompRecord
Definition: TypeRecord.h:928
llvm::codeview::PointerToMemberRepresentation::VirtualInheritanceFunction
@ VirtualInheritanceFunction
llvm::codeview::PointerRecord::getReferentType
TypeIndex getReferentType() const
Definition: TypeRecord.h:297
llvm::codeview::CallingConvention::NearC
@ NearC
llvm::codeview::VFTableShapeRecord
Definition: TypeRecord.h:552
llvm::codeview::MethodKind::Vanilla
@ Vanilla
llvm::codeview::CallingConvention::FarFast
@ FarFast
llvm::codeview::BaseClassRecord
Definition: TypeRecord.h:863
llvm::codeview::FunctionOptions::ConstructorWithVirtualBases
@ ConstructorWithVirtualBases
llvm::codeview::ProcedureRecord::getOptions
FunctionOptions getOptions() const
Definition: TypeRecord.h:158
llvm::codeview::MemberFunctionRecord::getArgumentList
TypeIndex getArgumentList() const
Definition: TypeRecord.h:191
llvm::codeview::OneMethodRecord::getName
StringRef getName() const
Definition: TypeRecord.h:737
llvm::codeview::CallingConvention::NearVector
@ NearVector
llvm::ScopedPrinter::startLine
raw_ostream & startLine()
Definition: ScopedPrinter.h:322
visitKnownRecord
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
Definition: CVSymbolVisitor.cpp:21
llvm::codeview::MemberAccess::Public
@ Public
llvm::codeview::PointerRecord
Definition: TypeRecord.h:263
llvm::codeview::LabelType
LabelType
Equivalent to CV_LABEL_TYPE_e.
Definition: CodeView.h:295
llvm::codeview::PointerMode::Pointer
@ Pointer
llvm::codeview::DataMemberRecord
Definition: TypeRecord.h:783
llvm::codeview::ClassOptions::HasOverloadedOperator
@ HasOverloadedOperator
llvm::codeview::PointerKind::BasedOnSegmentValue
@ BasedOnSegmentValue
llvm::EnumEntry
Definition: ScopedPrinter.h:24
llvm::pdb::PDB_LocType::BitField
@ BitField
llvm::ScopedPrinter::unindent
void unindent(int Levels=1)
Definition: ScopedPrinter.h:86
llvm::AArch64CC::LT
@ LT
Definition: AArch64BaseInfo.h:266
llvm::codeview::ClassOptions::ContainsNestedClass
@ ContainsNestedClass
llvm::codeview::ClassOptions::Scoped
@ Scoped
Arg
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
Definition: AMDGPULibCalls.cpp:206
llvm::codeview::MethodKind::IntroducingVirtual
@ IntroducingVirtual
llvm::codeview::MethodKind::Virtual
@ Virtual
llvm::codeview::visitMemberRecordStream
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
Definition: CVTypeVisitor.cpp:270
llvm::codeview::MethodKind::Friend
@ Friend
llvm::codeview::printTypeIndex
void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, TypeIndex TI, TypeCollection &Types)
Definition: TypeIndex.cpp:92
llvm::formatv
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
Definition: FormatVariadic.h:250
llvm::codeview::PointerKind::Far32
@ Far32
llvm::codeview::ProcedureRecord::getReturnType
TypeIndex getReturnType() const
Definition: TypeRecord.h:156
llvm::codeview::ArgListRecord
Definition: TypeRecord.h:235
llvm::codeview::MemberAttributes
Equvalent to CV_fldattr_t in cvinfo.h.
Definition: TypeRecord.h:40
llvm::codeview::EnumRecord
Definition: TypeRecord.h:518
llvm::codeview::CVMemberRecord
Definition: TypeRecord.h:34
llvm::codeview::MemberAccess::Private
@ Private
llvm::codeview::MemberFunctionRecord::getReturnType
TypeIndex getReturnType() const
Definition: TypeRecord.h:185
llvm::codeview::PointerToMemberRepresentation::SingleInheritanceFunction
@ SingleInheritanceFunction
llvm::codeview::CallingConvention::SHCall
@ SHCall
SmallString.h
llvm::codeview::ProcedureRecord::getArgumentList
TypeIndex getArgumentList() const
Definition: TypeRecord.h:160
llvm::codeview::TypeDumpVisitor::visitMemberBegin
Error visitMemberBegin(CVMemberRecord &Record) override
Definition: TypeDumpVisitor.cpp:192
llvm::codeview::CallingConvention::SH5Call
@ SH5Call
llvm::ScopedPrinter::printNumber
void printNumber(StringRef Label, uint64_t Value)
Definition: ScopedPrinter.h:172
llvm::codeview::BitFieldRecord
Definition: TypeRecord.h:534
llvm::codeview::TypeDumpVisitor::visitTypeEnd
Error visitTypeEnd(CVType &Record) override
Definition: TypeDumpVisitor.cpp:183
llvm::codeview::CallingConvention::FarC
@ FarC
llvm::codeview::PointerRecord::isRValueReferenceThisPtr
bool isRValueReferenceThisPtr() const
Definition: TypeRecord.h:343
llvm::codeview::MethodOverloadListRecord
Definition: TypeRecord.h:751
llvm::codeview::MemberFunctionRecord::getClassType
TypeIndex getClassType() const
Definition: TypeRecord.h:186
llvm::DelimitedScope
Definition: ScopedPrinter.h:361
llvm::codeview::TypeDumpVisitor::printItemIndex
void printItemIndex(StringRef FieldName, TypeIndex TI) const
Definition: TypeDumpVisitor.cpp:165
llvm::codeview::MethodKind
MethodKind
Part of member attribute flags. (CV_methodprop_e)
Definition: CodeView.h:271
Formatters.h
llvm::codeview::UdtModSourceLineRecord
Definition: TypeRecord.h:645
llvm::codeview::StringListRecord::getIndices
ArrayRef< TypeIndex > getIndices() const
Definition: TypeRecord.h:257
llvm::codeview::ClassOptions::Sealed
@ Sealed
llvm::codeview::ArrayRecord::getName
StringRef getName() const
Definition: TypeRecord.h:407
llvm::codeview::TypeDumpVisitor::visitUnknownMember
Error visitUnknownMember(CVMemberRecord &Record) override
Definition: TypeDumpVisitor.cpp:454
Options
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
Definition: PassBuilderBindings.cpp:48
llvm::codeview::ListContinuationRecord
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
Definition: TypeRecord.h:914
llvm::codeview::PointerToMemberRepresentation::SingleInheritanceData
@ SingleInheritanceData
llvm::codeview::ModifierOptions::Volatile
@ Volatile
llvm::codeview::ModifierRecord
Definition: TypeRecord.h:129
llvm::codeview::OverloadedMethodRecord
For method overload sets. LF_METHOD.
Definition: TypeRecord.h:764
llvm::codeview::ClassOptions
ClassOptions
Definition: CodeView.h:204
FormatVariadic.h
llvm::codeview::MemberFunctionRecord::getThisType
TypeIndex getThisType() const
Definition: TypeRecord.h:187
llvm::codeview::MethodOptions::None
@ None
llvm::codeview::MemberFunctionRecord
Definition: TypeRecord.h:170
llvm::None
const NoneType None
Definition: None.h:23
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::codeview::CallingConvention::NearFast
@ NearFast
llvm::codeview::PointerMode::LValueReference
@ LValueReference
llvm::codeview::ClassOptions::Intrinsic
@ Intrinsic
llvm::codeview::OneMethodRecord::isIntroducingVirtual
bool isIntroducingVirtual() const
Definition: TypeRecord.h:739
llvm::codeview::PointerMode
PointerMode
Equivalent to CV_ptrmode_e.
Definition: CodeView.h:351
llvm::codeview::CallingConvention::FarPascal
@ FarPascal
MemberAccessNames
static const EnumEntry< uint8_t > MemberAccessNames[]
Definition: TypeDumpVisitor.cpp:46
llvm::codeview::TypeDumpVisitor::visitMemberEnd
Error visitMemberEnd(CVMemberRecord &Record) override
Definition: TypeDumpVisitor.cpp:201
llvm::codeview::TypeServer2Record::getAge
uint32_t getAge() const
Definition: TypeRecord.h:585
llvm::codeview::PointerRecord::getMode
PointerMode getMode() const
Definition: TypeRecord.h:304
llvm::codeview::PointerRecord::isUnaligned
bool isUnaligned() const
Definition: TypeRecord.h:331
llvm::codeview::TypeDumpVisitor::visitUnknownType
Error visitUnknownType(CVType &Record) override
Action to take on unknown types. By default, they are ignored.
Definition: TypeDumpVisitor.cpp:459
llvm::codeview::TypeDumpVisitor::printTypeIndex
void printTypeIndex(StringRef FieldName, TypeIndex TI) const
Definition: TypeDumpVisitor.cpp:161
llvm::ScopedPrinter::printFlags
void printFlags(StringRef Label, T Value, ArrayRef< EnumEntry< TFlag >> Flags, TFlag EnumMask1={}, TFlag EnumMask2={}, TFlag EnumMask3={})
Definition: ScopedPrinter.h:125
llvm::codeview::MemberFunctionRecord::getThisPointerAdjustment
int32_t getThisPointerAdjustment() const
Definition: TypeRecord.h:192
llvm::codeview::TypeServer2Record
Definition: TypeRecord.h:574
llvm::codeview::TypeServer2Record::getName
StringRef getName() const
Definition: TypeRecord.h:586
LabelTypeEnum
static const EnumEntry< uint16_t > LabelTypeEnum[]
Definition: TypeDumpVisitor.cpp:143
llvm::codeview::TypeCollection::size
virtual uint32_t size()=0
llvm::codeview::EnumeratorRecord
Definition: TypeRecord.h:829
llvm::codeview::OneMethodRecord
Definition: TypeRecord.h:719
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
TypeRecord.h
llvm::ScopedPrinter::printEnum
void printEnum(StringRef Label, T Value, ArrayRef< EnumEntry< TEnum >> EnumValues)
Definition: ScopedPrinter.h:105
Generic
@ Generic
Definition: AArch64MCAsmInfo.cpp:23
llvm::codeview::VirtualBaseClassRecord
Definition: TypeRecord.h:884
llvm::codeview::PointerRecord::getSize
uint8_t getSize() const
Definition: TypeRecord.h:313
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::codeview::ContinuationRecordKind::FieldList
@ FieldList
llvm::HexNumber
Definition: ScopedPrinter.h:40
llvm::codeview::PointerRecord::isConst
bool isConst() const
Definition: TypeRecord.h:325
llvm::codeview::CallingConvention::ClrCall
@ ClrCall
llvm::codeview::CallingConvention::NearSysCall
@ NearSysCall
llvm::ScopedPrinter::printBinaryBlock
void printBinaryBlock(StringRef Label, ArrayRef< uint8_t > Value, uint32_t StartOffset)
Definition: ScopedPrinter.h:303
llvm::codeview::CallingConvention::Inline
@ Inline
PtrKindNames
static const EnumEntry< uint8_t > PtrKindNames[]
Definition: TypeDumpVisitor.cpp:69
TypeDumpVisitor.h
llvm::codeview::ProcedureRecord::getParameterCount
uint16_t getParameterCount() const
Definition: TypeRecord.h:159
llvm::codeview::PointerKind::Huge16
@ Huge16
llvm::codeview::StaticDataMemberRecord
Definition: TypeRecord.h:808
llvm::codeview::CompileSym2Flags::EC
@ EC
llvm::codeview::OverloadedMethodRecord::getMethodList
TypeIndex getMethodList() const
Definition: TypeRecord.h:774
getLeafTypeName
static StringRef getLeafTypeName(TypeLeafKind LT)
Definition: TypeDumpVisitor.cpp:149
llvm::codeview::PrecompRecord::getSignature
uint32_t getSignature() const
Definition: TypeRecord.h:935
llvm::Record
Definition: Record.h:1486
llvm::codeview::PrecompRecord::getPrecompFilePath
StringRef getPrecompFilePath() const
Definition: TypeRecord.h:936
llvm::pdb::PDB_UdtType::Union
@ Union
llvm::codeview::VFTableRecord::getVFPtrOffset
uint32_t getVFPtrOffset() const
Definition: TypeRecord.h:705
llvm::codeview::FuncIdRecord
Definition: TypeRecord.h:609
MemberKindNames
static const EnumEntry< uint16_t > MemberKindNames[]
Definition: TypeDumpVisitor.cpp:59
llvm::codeview::CallingConvention::FarStdCall
@ FarStdCall
llvm::codeview::PointerKind::Near16
@ Near16
llvm::codeview::PointerKind::Near32
@ Near32
llvm::codeview::FieldListRecord
Definition: TypeRecord.h:384
llvm::codeview::OneMethodRecord::getMethodKind
MethodKind getMethodKind() const
Definition: TypeRecord.h:733
llvm::codeview::OverloadedMethodRecord::getNumOverloads
uint16_t getNumOverloads() const
Definition: TypeRecord.h:773
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
llvm::codeview::CVRecord< TypeLeafKind >
llvm::codeview::ClassOptions::HasOverloadedAssignmentOperator
@ HasOverloadedAssignmentOperator
llvm::codeview::OneMethodRecord::getAccess
MemberAccess getAccess() const
Definition: TypeRecord.h:735
llvm::codeview::PointerMode::RValueReference
@ RValueReference
llvm::codeview::ArrayRecord::getElementType
TypeIndex getElementType() const
Definition: TypeRecord.h:404
llvm::codeview::UdtSourceLineRecord
Definition: TypeRecord.h:627
uint32_t
llvm::codeview::CallingConvention::M32RCall
@ M32RCall
llvm::codeview::VFTableRecord
Definition: TypeRecord.h:690
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::codeview::CallingConvention::PpcCall
@ PpcCall
llvm::codeview::MethodOptions::CompilerGenerated
@ CompilerGenerated
llvm::pdb::PDB_SymType::Enum
@ Enum
llvm::codeview::PointerToMemberRepresentation
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
Definition: CodeView.h:374
llvm::ifs::IFSSymbolType::Func
@ Func
llvm::codeview::PointerRecord::isLValueReferenceThisPtr
bool isLValueReferenceThisPtr() const
Definition: TypeRecord.h:339
llvm::codeview::EndPrecompRecord::getSignature
uint32_t getSignature() const
Definition: TypeRecord.h:950
llvm::codeview::CallingConvention::NearStdCall
@ NearStdCall
PtrModeNames
static const EnumEntry< uint8_t > PtrModeNames[]
Definition: TypeDumpVisitor.cpp:85
llvm::codeview::ProcedureRecord
Definition: TypeRecord.h:145
llvm::codeview::ClassOptions::Packed
@ Packed
llvm::codeview::MethodOptions::NoConstruct
@ NoConstruct
llvm::codeview::FunctionOptions::Constructor
@ Constructor
llvm::codeview::VFTableRecord::getCompleteClass
TypeIndex getCompleteClass() const
Definition: TypeRecord.h:703
llvm::codeview::PointerKind::BasedOnSelf
@ BasedOnSelf
llvm::codeview::TypeDumpVisitor::visitTypeBegin
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
Definition: TypeDumpVisitor.cpp:169
uint16_t
LeafTypeNames
static const EnumEntry< TypeLeafKind > LeafTypeNames[]
Definition: TypeDumpVisitor.cpp:23
llvm::codeview::LabelType::Near
@ Near
llvm::codeview::MemberFunctionRecord::getParameterCount
uint16_t getParameterCount() const
Definition: TypeRecord.h:190
llvm::codeview::UnionRecord
Definition: TypeRecord.h:497
PtrMemberRepNames
static const EnumEntry< uint16_t > PtrMemberRepNames[]
Definition: TypeDumpVisitor.cpp:93
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::codeview::PointerMode::PointerToMemberFunction
@ PointerToMemberFunction
TypeCollection.h
ClassOptionNames
static const EnumEntry< uint16_t > ClassOptionNames[]
Definition: TypeDumpVisitor.cpp:31
llvm::codeview::ModifierOptions::Unaligned
@ Unaligned
llvm::codeview::PointerToMemberRepresentation::GeneralFunction
@ GeneralFunction
llvm::ScopedPrinter::indent
void indent(int Levels=1)
Definition: ScopedPrinter.h:84
llvm::codeview::LabelRecord::Mode
LabelType Mode
Definition: TypeRecord.h:212
CVTypeVisitor.h
Arguments
AMDGPU Lower Kernel Arguments
Definition: AMDGPULowerKernelArguments.cpp:243
CallingConventions
static const EnumEntry< uint8_t > CallingConventions[]
Definition: TypeDumpVisitor.cpp:110
FunctionOptionEnum
static const EnumEntry< uint8_t > FunctionOptionEnum[]
Definition: TypeDumpVisitor.cpp:137
llvm::codeview::PointerKind::BasedOnType
@ BasedOnType
visitKnownMember
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
Definition: CVTypeVisitor.cpp:33
llvm::codeview::PointerMode::PointerToDataMember
@ PointerToDataMember
TypeIndex.h
llvm::codeview::FunctionOptions::CxxReturnUdt
@ CxxReturnUdt
llvm::codeview::PointerKind::BasedOnValue
@ BasedOnValue
MethodOptionNames
static const EnumEntry< uint16_t > MethodOptionNames[]
Definition: TypeDumpVisitor.cpp:51
llvm::codeview::VFPtrRecord
Definition: TypeRecord.h:850
llvm::codeview::BuildInfoRecord
Definition: TypeRecord.h:666
llvm::codeview::PointerKind::Near64
@ Near64
llvm::codeview::MemberFuncIdRecord
Definition: TypeRecord.h:216
llvm::codeview::ModifierOptions::Const
@ Const
llvm::codeview::PointerRecord::isPointerToMember
bool isPointerToMember() const
Definition: TypeRecord.h:319
llvm::codeview::TypeLeafKind
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
Definition: CodeView.h:33
llvm::tgtok::Class
@ Class
Definition: TGLexer.h:50
llvm::codeview::MethodKind::PureIntroducingVirtual
@ PureIntroducingVirtual
llvm::codeview
Definition: AppendingTypeTableBuilder.h:22
llvm::makeArrayRef
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:474
llvm::codeview::CallingConvention::ArmCall
@ ArmCall
llvm::codeview::OverloadedMethodRecord::getName
StringRef getName() const
Definition: TypeRecord.h:775
ENUM_ENTRY
#define ENUM_ENTRY(enum_class, enum)
Definition: TypeDumpVisitor.cpp:28
llvm::codeview::CallingConvention::FarSysCall
@ FarSysCall
llvm::ScopedPrinter::printHex
void printHex(StringRef Label, T Value)
Definition: ScopedPrinter.h:245
llvm::codeview::ClassOptions::HasConversionOperator
@ HasConversionOperator
llvm::codeview::MemberFunctionRecord::getCallConv
CallingConvention getCallConv() const
Definition: TypeRecord.h:188
llvm::codeview::PointerRecord::isRestrict
bool isRestrict() const
Definition: TypeRecord.h:335
llvm::codeview::getBytesAsCharacters
StringRef getBytesAsCharacters(ArrayRef< uint8_t > LeafData)
Reinterpret a byte array as an array of characters.
Definition: RecordSerialization.cpp:27
llvm::codeview::StringListRecord
Definition: TypeRecord.h:249
llvm::codeview::PointerKind::BasedOnAddress
@ BasedOnAddress
llvm::codeview::ArrayRecord
Definition: TypeRecord.h:395
llvm::codeview::PointerRecord::getMemberInfo
MemberPointerInfo getMemberInfo() const
Definition: TypeRecord.h:317
N
#define N
llvm::codeview::VFTableRecord::getName
StringRef getName() const
Definition: TypeRecord.h:706
llvm::codeview::PointerRecord::getPointerKind
PointerKind getPointerKind() const
Definition: TypeRecord.h:299
llvm::codeview::PrecompRecord::getStartTypeIndex
uint32_t getStartTypeIndex() const
Definition: TypeRecord.h:933
llvm::codeview::CallingConvention
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:176
llvm::codeview::LabelRecord
Definition: TypeRecord.h:205
llvm::codeview::ClassOptions::HasUniqueName
@ HasUniqueName
llvm::codeview::CallingConvention::NearPascal
@ NearPascal
llvm::codeview::CallingConvention::TriCall
@ TriCall
llvm::codeview::OneMethodRecord::getOptions
MethodOptions getOptions() const
Definition: TypeRecord.h:734
llvm::codeview::OneMethodRecord::getVFTableOffset
int32_t getVFTableOffset() const
Definition: TypeRecord.h:736
llvm::codeview::PointerKind
PointerKind
Equivalent to CV_ptrtype_e.
Definition: CodeView.h:334
llvm::codeview::OneMethodRecord::getType
TypeIndex getType() const
Definition: TypeRecord.h:732
llvm::codeview::TypeIndex
A 32-bit type reference.
Definition: TypeIndex.h:96
llvm::codeview::PointerToMemberRepresentation::MultipleInheritanceData
@ MultipleInheritanceData
llvm::codeview::ArrayRecord::getIndexType
TypeIndex getIndexType() const
Definition: TypeRecord.h:405
llvm::codeview::ClassRecord
Definition: TypeRecord.h:464
llvm::codeview::PointerToMemberRepresentation::MultipleInheritanceFunction
@ MultipleInheritanceFunction
llvm::OptimizedStructLayoutField
A field in a structure.
Definition: OptimizedStructLayout.h:45
llvm::AMDGPU::HSAMD::Kernel::Key::Args
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Definition: AMDGPUMetadata.h:389
Mod
Module * Mod
Definition: PassBuilderBindings.cpp:54
llvm::codeview::PointerKind::Far16
@ Far16
llvm::codeview::CallingConvention::MipsCall
@ MipsCall
llvm::AMDGPU::VGPRIndexMode::Id
Id
Definition: SIDefines.h:232
llvm::codeview::MemberPointerInfo
Definition: TypeRecord.h:100
llvm::codeview::EndPrecompRecord
Definition: TypeRecord.h:945
llvm::codeview::PointerKind::BasedOnSegment
@ BasedOnSegment
llvm::codeview::ArrayRecord::getSize
uint64_t getSize() const
Definition: TypeRecord.h:406
llvm::codeview::ClassOptions::Nested
@ Nested
llvm::sampleprof::Base
@ Base
Definition: Discriminator.h:58
llvm::codeview::MethodOptions
MethodOptions
Equivalent to CV_fldattr_t bitfield.
Definition: CodeView.h:282
llvm::codeview::MemberFunctionRecord::getOptions
FunctionOptions getOptions() const
Definition: TypeRecord.h:189
ScopedPrinter.h