LLVM  15.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/ArrayRef.h"
20 
21 using namespace llvm;
22 using namespace llvm::codeview;
23 
25 #define CV_TYPE(enum, val) {#enum, enum},
26 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
27 };
28 
29 #define ENUM_ENTRY(enum_class, enum) \
30  { #enum, std::underlying_type < enum_class > ::type(enum_class::enum) }
31 
45 };
46 
50 };
51 
53  ENUM_ENTRY(MethodOptions, Pseudo),
58 };
59 
63  ENUM_ENTRY(MethodKind, Static),
68 };
69 
70 static const EnumEntry<uint8_t> PtrKindNames[] = {
84 };
85 
86 static const EnumEntry<uint8_t> PtrModeNames[] = {
92 };
93 
104 };
105 
109 };
110 
136 };
137 
142 };
143 
146 };
147 
148 #undef ENUM_ENTRY
149 
151  switch (LT) {
152 #define TYPE_RECORD(ename, value, name) \
153  case ename: \
154  return #name;
155 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
156  default:
157  break;
158  }
159  return "UnknownLeaf";
160 }
161 
163  codeview::printTypeIndex(*W, FieldName, TI, TpiTypes);
164 }
165 
167  codeview::printTypeIndex(*W, FieldName, TI, getSourceTypes());
168 }
169 
172 }
173 
175  W->startLine() << getLeafTypeName(Record.kind());
176  W->getOStream() << " (" << HexNumber(Index.getIndex()) << ")";
177  W->getOStream() << " {\n";
178  W->indent();
179  W->printEnum("TypeLeafKind", unsigned(Record.kind()),
181  return Error::success();
182 }
183 
185  if (PrintRecordBytes)
186  W->printBinaryBlock("LeafData", getBytesAsCharacters(Record.content()));
187 
188  W->unindent();
189  W->startLine() << "}\n";
190  return Error::success();
191 }
192 
194  W->startLine() << getLeafTypeName(Record.Kind);
195  W->getOStream() << " {\n";
196  W->indent();
197  W->printEnum("TypeLeafKind", unsigned(Record.Kind),
199  return Error::success();
200 }
201 
203  if (PrintRecordBytes)
204  W->printBinaryBlock("LeafData", getBytesAsCharacters(Record.Data));
205 
206  W->unindent();
207  W->startLine() << "}\n";
208  return Error::success();
209 }
210 
212  FieldListRecord &FieldList) {
213  if (auto EC = codeview::visitMemberRecordStream(FieldList.Data, *this))
214  return EC;
215 
216  return Error::success();
217 }
218 
220  printItemIndex("Id", String.getId());
221  W->printString("StringData", String.getString());
222  return Error::success();
223 }
224 
226  auto Indices = Args.getIndices();
227  uint32_t Size = Indices.size();
228  W->printNumber("NumArgs", Size);
229  ListScope Arguments(*W, "Arguments");
230  for (uint32_t I = 0; I < Size; ++I) {
231  printTypeIndex("ArgType", Indices[I]);
232  }
233  return Error::success();
234 }
235 
237  auto Indices = Strs.getIndices();
238  uint32_t Size = Indices.size();
239  W->printNumber("NumStrings", Size);
240  ListScope Arguments(*W, "Strings");
241  for (uint32_t I = 0; I < Size; ++I) {
242  printItemIndex("String", Indices[I]);
243  }
244  return Error::success();
245 }
246 
248  uint16_t Props = static_cast<uint16_t>(Class.getOptions());
249  W->printNumber("MemberCount", Class.getMemberCount());
250  W->printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
251  printTypeIndex("FieldList", Class.getFieldList());
252  printTypeIndex("DerivedFrom", Class.getDerivationList());
253  printTypeIndex("VShape", Class.getVTableShape());
254  W->printNumber("SizeOf", Class.getSize());
255  W->printString("Name", Class.getName());
257  W->printString("LinkageName", Class.getUniqueName());
258  return Error::success();
259 }
260 
262  uint16_t Props = static_cast<uint16_t>(Union.getOptions());
263  W->printNumber("MemberCount", Union.getMemberCount());
264  W->printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
265  printTypeIndex("FieldList", Union.getFieldList());
266  W->printNumber("SizeOf", Union.getSize());
267  W->printString("Name", Union.getName());
269  W->printString("LinkageName", Union.getUniqueName());
270  return Error::success();
271 }
272 
274  uint16_t Props = static_cast<uint16_t>(Enum.getOptions());
275  W->printNumber("NumEnumerators", Enum.getMemberCount());
276  W->printFlags("Properties", uint16_t(Enum.getOptions()),
278  printTypeIndex("UnderlyingType", Enum.getUnderlyingType());
279  printTypeIndex("FieldListType", Enum.getFieldList());
280  W->printString("Name", Enum.getName());
282  W->printString("LinkageName", Enum.getUniqueName());
283  return Error::success();
284 }
285 
287  printTypeIndex("ElementType", AT.getElementType());
288  printTypeIndex("IndexType", AT.getIndexType());
289  W->printNumber("SizeOf", AT.getSize());
290  W->printString("Name", AT.getName());
291  return Error::success();
292 }
293 
295  printTypeIndex("CompleteClass", VFT.getCompleteClass());
296  printTypeIndex("OverriddenVFTable", VFT.getOverriddenVTable());
297  W->printHex("VFPtrOffset", VFT.getVFPtrOffset());
298  W->printString("VFTableName", VFT.getName());
299  for (auto N : VFT.getMethodNames())
300  W->printString("MethodName", N);
301  return Error::success();
302 }
303 
305  printTypeIndex("ClassType", Id.getClassType());
306  printTypeIndex("FunctionType", Id.getFunctionType());
307  W->printString("Name", Id.getName());
308  return Error::success();
309 }
310 
312  printTypeIndex("ReturnType", Proc.getReturnType());
313  W->printEnum("CallingConvention", uint8_t(Proc.getCallConv()),
315  W->printFlags("FunctionOptions", uint8_t(Proc.getOptions()),
317  W->printNumber("NumParameters", Proc.getParameterCount());
318  printTypeIndex("ArgListType", Proc.getArgumentList());
319  return Error::success();
320 }
321 
323  printTypeIndex("ReturnType", MF.getReturnType());
324  printTypeIndex("ClassType", MF.getClassType());
325  printTypeIndex("ThisType", MF.getThisType());
326  W->printEnum("CallingConvention", uint8_t(MF.getCallConv()),
328  W->printFlags("FunctionOptions", uint8_t(MF.getOptions()),
330  W->printNumber("NumParameters", MF.getParameterCount());
331  printTypeIndex("ArgListType", MF.getArgumentList());
332  W->printNumber("ThisAdjustment", MF.getThisPointerAdjustment());
333  return Error::success();
334 }
335 
337  MethodOverloadListRecord &MethodList) {
338  for (auto &M : MethodList.getMethods()) {
339  ListScope S(*W, "Method");
340  printMemberAttributes(M.getAccess(), M.getMethodKind(), M.getOptions());
341  printTypeIndex("Type", M.getType());
342  if (M.isIntroducingVirtual())
343  W->printHex("VFTableOffset", M.getVFTableOffset());
344  }
345  return Error::success();
346 }
347 
349  printItemIndex("ParentScope", Func.getParentScope());
350  printTypeIndex("FunctionType", Func.getFunctionType());
351  W->printString("Name", Func.getName());
352  return Error::success();
353 }
354 
356  W->printString("Guid", formatv("{0}", TS.getGuid()).str());
357  W->printNumber("Age", TS.getAge());
358  W->printString("Name", TS.getName());
359  return Error::success();
360 }
361 
363  printTypeIndex("PointeeType", Ptr.getReferentType());
364  W->printEnum("PtrType", unsigned(Ptr.getPointerKind()),
366  W->printEnum("PtrMode", unsigned(Ptr.getMode()), makeArrayRef(PtrModeNames));
367 
368  W->printNumber("IsFlat", Ptr.isFlat());
369  W->printNumber("IsConst", Ptr.isConst());
370  W->printNumber("IsVolatile", Ptr.isVolatile());
371  W->printNumber("IsUnaligned", Ptr.isUnaligned());
372  W->printNumber("IsRestrict", Ptr.isRestrict());
373  W->printNumber("IsThisPtr&", Ptr.isLValueReferenceThisPtr());
374  W->printNumber("IsThisPtr&&", Ptr.isRValueReferenceThisPtr());
375  W->printNumber("SizeOf", Ptr.getSize());
376 
377  if (Ptr.isPointerToMember()) {
378  const MemberPointerInfo &MI = Ptr.getMemberInfo();
379 
380  printTypeIndex("ClassType", MI.getContainingType());
381  W->printEnum("Representation", uint16_t(MI.getRepresentation()),
383  }
384 
385  return Error::success();
386 }
387 
389  uint16_t Mods = static_cast<uint16_t>(Mod.getModifiers());
390  printTypeIndex("ModifiedType", Mod.getModifiedType());
391  W->printFlags("Modifiers", Mods, makeArrayRef(TypeModifierNames));
392 
393  return Error::success();
394 }
395 
397  printTypeIndex("Type", BitField.getType());
398  W->printNumber("BitSize", BitField.getBitSize());
399  W->printNumber("BitOffset", BitField.getBitOffset());
400  return Error::success();
401 }
402 
404  VFTableShapeRecord &Shape) {
405  W->printNumber("VFEntryCount", Shape.getEntryCount());
406  return Error::success();
407 }
408 
411  printTypeIndex("UDT", Line.getUDT());
412  printItemIndex("SourceFile", Line.getSourceFile());
413  W->printNumber("LineNumber", Line.getLineNumber());
414  return Error::success();
415 }
416 
419  printTypeIndex("UDT", Line.getUDT());
420  printItemIndex("SourceFile", Line.getSourceFile());
421  W->printNumber("LineNumber", Line.getLineNumber());
422  W->printNumber("Module", Line.getModule());
423  return Error::success();
424 }
425 
427  W->printNumber("NumArgs", static_cast<uint32_t>(Args.getArgs().size()));
428 
429  ListScope Arguments(*W, "Arguments");
430  for (auto Arg : Args.getArgs()) {
431  printItemIndex("ArgType", Arg);
432  }
433  return Error::success();
434 }
435 
436 void TypeDumpVisitor::printMemberAttributes(MemberAttributes Attrs) {
437  return printMemberAttributes(Attrs.getAccess(), Attrs.getMethodKind(),
438  Attrs.getFlags());
439 }
440 
441 void TypeDumpVisitor::printMemberAttributes(MemberAccess Access,
444  W->printEnum("AccessSpecifier", uint8_t(Access),
446  // Data members will be vanilla. Don't try to print a method kind for them.
447  if (Kind != MethodKind::Vanilla)
448  W->printEnum("MethodKind", unsigned(Kind), makeArrayRef(MemberKindNames));
449  if (Options != MethodOptions::None) {
450  W->printFlags("MethodOptions", unsigned(Options),
452  }
453 }
454 
456  W->printHex("UnknownMember", unsigned(Record.Kind));
457  return Error::success();
458 }
459 
461  W->printEnum("Kind", uint16_t(Record.kind()), makeArrayRef(LeafTypeNames));
462  W->printNumber("Length", uint32_t(Record.content().size()));
463  return Error::success();
464 }
465 
467  NestedTypeRecord &Nested) {
468  printTypeIndex("Type", Nested.getNestedType());
469  W->printString("Name", Nested.getName());
470  return Error::success();
471 }
472 
474  OneMethodRecord &Method) {
475  MethodKind K = Method.getMethodKind();
476  printMemberAttributes(Method.getAccess(), K, Method.getOptions());
477  printTypeIndex("Type", Method.getType());
478  // If virtual, then read the vftable offset.
479  if (Method.isIntroducingVirtual())
480  W->printHex("VFTableOffset", Method.getVFTableOffset());
481  W->printString("Name", Method.getName());
482  return Error::success();
483 }
484 
486  OverloadedMethodRecord &Method) {
487  W->printHex("MethodCount", Method.getNumOverloads());
488  printTypeIndex("MethodListIndex", Method.getMethodList());
489  W->printString("Name", Method.getName());
490  return Error::success();
491 }
492 
495  printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
497  printTypeIndex("Type", Field.getType());
498  W->printHex("FieldOffset", Field.getFieldOffset());
499  W->printString("Name", Field.getName());
500  return Error::success();
501 }
502 
505  printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
507  printTypeIndex("Type", Field.getType());
508  W->printString("Name", Field.getName());
509  return Error::success();
510 }
511 
513  VFPtrRecord &VFTable) {
514  printTypeIndex("Type", VFTable.getType());
515  return Error::success();
516 }
517 
519  EnumeratorRecord &Enum) {
520  printMemberAttributes(Enum.getAccess(), MethodKind::Vanilla,
522  W->printNumber("EnumValue", Enum.getValue());
523  W->printString("Name", Enum.getName());
524  return Error::success();
525 }
526 
529  printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
531  printTypeIndex("BaseType", Base.getBaseType());
532  W->printHex("BaseOffset", Base.getBaseOffset());
533  return Error::success();
534 }
535 
538  printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
540  printTypeIndex("BaseType", Base.getBaseType());
541  printTypeIndex("VBPtrType", Base.getVBPtrType());
542  W->printHex("VBPtrOffset", Base.getVBPtrOffset());
543  W->printHex("VBTableIndex", Base.getVTableIndex());
544  return Error::success();
545 }
546 
548  ListContinuationRecord &Cont) {
549  printTypeIndex("ContinuationIndex", Cont.getContinuationIndex());
550  return Error::success();
551 }
552 
555  return Error::success();
556 }
557 
559  PrecompRecord &Precomp) {
560  W->printHex("StartIndex", Precomp.getStartTypeIndex());
561  W->printHex("Count", Precomp.getTypesCount());
562  W->printHex("Signature", Precomp.getSignature());
563  W->printString("PrecompFile", Precomp.getPrecompFilePath());
564  return Error::success();
565 }
566 
568  EndPrecompRecord &EndPrecomp) {
569  W->printHex("Signature", EndPrecomp.getSignature());
570  return Error::success();
571 }
llvm::Check::Size
@ Size
Definition: FileCheck.h:77
llvm::codeview::VFTableRecord::getOverriddenVTable
TypeIndex getOverriddenVTable() const
Definition: TypeRecord.h:705
llvm::codeview::PointerRecord::isFlat
bool isFlat() const
Definition: TypeRecord.h:325
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:265
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:104
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::codeview::ListContinuationRecord::getContinuationIndex
TypeIndex getContinuationIndex() const
Definition: TypeRecord.h:923
llvm::codeview::MethodOverloadListRecord::getMethods
ArrayRef< OneMethodRecord > getMethods() const
Definition: TypeRecord.h:759
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:158
llvm::codeview::VFTableShapeRecord::getEntryCount
uint32_t getEntryCount() const
Definition: TypeRecord.h:568
llvm::codeview::PrecompRecord::getTypesCount
uint32_t getTypesCount() const
Definition: TypeRecord.h:935
llvm::codeview::TypeServer2Record::getGuid
const GUID & getGuid() const
Definition: TypeRecord.h:585
llvm::codeview::VFPtrRecord::getType
TypeIndex getType() const
Definition: TypeRecord.h:858
RecordSerialization.h
llvm::codeview::MethodKind::PureVirtual
@ PureVirtual
llvm::codeview::LabelType::Far
@ Far
llvm::codeview::ModifierOptions
ModifierOptions
Equivalent to CV_modifier_t.
Definition: CodeView.h:304
llvm::codeview::StringIdRecord
Definition: TypeRecord.h:595
llvm::codeview::MethodOptions::NoInherit
@ NoInherit
llvm::codeview::NestedTypeRecord
Definition: TypeRecord.h:370
llvm::codeview::PointerKind::BasedOnSegmentAddress
@ BasedOnSegmentAddress
llvm::codeview::ClassOptions::HasConstructorOrDestructor
@ HasConstructorOrDestructor
llvm::codeview::FunctionOptions
FunctionOptions
Definition: CodeView.h:249
llvm::codeview::PointerRecord::isVolatile
bool isVolatile() const
Definition: TypeRecord.h:328
llvm::codeview::CallingConvention::AlphaCall
@ AlphaCall
llvm::codeview::Line
Definition: Line.h:90
llvm::codeview::CallingConvention::AM33Call
@ AM33Call
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:709
llvm::codeview::PointerToMemberRepresentation::VirtualInheritanceData
@ VirtualInheritanceData
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition: Error.h:329
llvm::codeview::PointerToMemberRepresentation::GeneralData
@ GeneralData
llvm::codeview::MemberAccess::Protected
@ Protected
TypeModifierNames
static const EnumEntry< uint16_t > TypeModifierNames[]
Definition: TypeDumpVisitor.cpp:106
llvm::codeview::PrecompRecord
Definition: TypeRecord.h:929
llvm::codeview::PointerToMemberRepresentation::VirtualInheritanceFunction
@ VirtualInheritanceFunction
llvm::codeview::PointerRecord::getReferentType
TypeIndex getReferentType() const
Definition: TypeRecord.h:298
llvm::ScopedPrinter::getOStream
virtual raw_ostream & getOStream()
Definition: ScopedPrinter.h:410
llvm::codeview::CallingConvention::NearC
@ NearC
llvm::codeview::VFTableShapeRecord
Definition: TypeRecord.h:553
llvm::codeview::MethodKind::Vanilla
@ Vanilla
llvm::codeview::CallingConvention::FarFast
@ FarFast
llvm::codeview::BaseClassRecord
Definition: TypeRecord.h:864
llvm::codeview::FunctionOptions::ConstructorWithVirtualBases
@ ConstructorWithVirtualBases
llvm::codeview::ProcedureRecord::getOptions
FunctionOptions getOptions() const
Definition: TypeRecord.h:159
llvm::codeview::MemberFunctionRecord::getArgumentList
TypeIndex getArgumentList() const
Definition: TypeRecord.h:192
llvm::codeview::OneMethodRecord::getName
StringRef getName() const
Definition: TypeRecord.h:738
llvm::codeview::CallingConvention::NearVector
@ NearVector
visitKnownRecord
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
Definition: CVSymbolVisitor.cpp:25
llvm::ListScope
Definition: ScopedPrinter.h:819
llvm::codeview::MemberAccess::Public
@ Public
llvm::codeview::PointerRecord
Definition: TypeRecord.h:264
llvm::codeview::LabelType
LabelType
Equivalent to CV_LABEL_TYPE_e.
Definition: CodeView.h:297
llvm::codeview::PointerMode::Pointer
@ Pointer
llvm::codeview::DataMemberRecord
Definition: TypeRecord.h:784
llvm::codeview::ClassOptions::HasOverloadedOperator
@ HasOverloadedOperator
llvm::codeview::PointerKind::BasedOnSegmentValue
@ BasedOnSegmentValue
llvm::EnumEntry
Definition: EnumTables.h:18
llvm::pdb::PDB_LocType::BitField
@ BitField
llvm::ScopedPrinter::unindent
void unindent(int Levels=1)
Definition: ScopedPrinter.h:124
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:186
llvm::codeview::MethodKind::IntroducingVirtual
@ IntroducingVirtual
llvm::codeview::MethodKind::Virtual
@ Virtual
llvm::codeview::visitMemberRecordStream
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
Definition: CVTypeVisitor.cpp:271
llvm::codeview::MethodKind::Friend
@ Friend
llvm::codeview::printTypeIndex
void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, TypeIndex TI, TypeCollection &Types)
Definition: TypeIndex.cpp:93
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:251
llvm::codeview::PointerKind::Far32
@ Far32
llvm::codeview::ProcedureRecord::getReturnType
TypeIndex getReturnType() const
Definition: TypeRecord.h:157
llvm::codeview::ArgListRecord
Definition: TypeRecord.h:236
llvm::codeview::MemberAttributes
Equvalent to CV_fldattr_t in cvinfo.h.
Definition: TypeRecord.h:40
llvm::codeview::EnumRecord
Definition: TypeRecord.h:519
llvm::codeview::CVMemberRecord
Definition: TypeRecord.h:34
llvm::codeview::MemberAccess::Private
@ Private
llvm::codeview::MemberFunctionRecord::getReturnType
TypeIndex getReturnType() const
Definition: TypeRecord.h:186
llvm::codeview::PointerToMemberRepresentation::SingleInheritanceFunction
@ SingleInheritanceFunction
llvm::codeview::CallingConvention::SHCall
@ SHCall
llvm::codeview::ProcedureRecord::getArgumentList
TypeIndex getArgumentList() const
Definition: TypeRecord.h:161
llvm::codeview::TypeDumpVisitor::visitMemberBegin
Error visitMemberBegin(CVMemberRecord &Record) override
Definition: TypeDumpVisitor.cpp:193
llvm::codeview::CallingConvention::SH5Call
@ SH5Call
llvm::codeview::BitFieldRecord
Definition: TypeRecord.h:535
llvm::codeview::TypeDumpVisitor::visitTypeEnd
Error visitTypeEnd(CVType &Record) override
Definition: TypeDumpVisitor.cpp:184
llvm::codeview::CallingConvention::FarC
@ FarC
llvm::codeview::PointerRecord::isRValueReferenceThisPtr
bool isRValueReferenceThisPtr() const
Definition: TypeRecord.h:344
llvm::codeview::MethodOverloadListRecord
Definition: TypeRecord.h:752
llvm::codeview::MemberFunctionRecord::getClassType
TypeIndex getClassType() const
Definition: TypeRecord.h:187
llvm::codeview::TypeDumpVisitor::printItemIndex
void printItemIndex(StringRef FieldName, TypeIndex TI) const
Definition: TypeDumpVisitor.cpp:166
llvm::codeview::MethodKind
MethodKind
Part of member attribute flags. (CV_methodprop_e)
Definition: CodeView.h:273
llvm::codeview::UdtModSourceLineRecord
Definition: TypeRecord.h:646
llvm::codeview::StringListRecord::getIndices
ArrayRef< TypeIndex > getIndices() const
Definition: TypeRecord.h:258
llvm::codeview::ClassOptions::Sealed
@ Sealed
llvm::codeview::ArrayRecord::getName
StringRef getName() const
Definition: TypeRecord.h:408
llvm::codeview::TypeDumpVisitor::visitUnknownMember
Error visitUnknownMember(CVMemberRecord &Record) override
Definition: TypeDumpVisitor.cpp:455
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:915
llvm::codeview::PointerToMemberRepresentation::SingleInheritanceData
@ SingleInheritanceData
llvm::codeview::ModifierOptions::Volatile
@ Volatile
llvm::codeview::ModifierRecord
Definition: TypeRecord.h:130
llvm::codeview::OverloadedMethodRecord
For method overload sets. LF_METHOD.
Definition: TypeRecord.h:765
llvm::codeview::ClassOptions
ClassOptions
Definition: CodeView.h:206
FormatVariadic.h
llvm::codeview::MemberFunctionRecord::getThisType
TypeIndex getThisType() const
Definition: TypeRecord.h:188
llvm::codeview::MethodOptions::None
@ None
llvm::codeview::MemberFunctionRecord
Definition: TypeRecord.h:171
llvm::None
const NoneType None
Definition: None.h:24
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:740
llvm::codeview::PointerMode
PointerMode
Equivalent to CV_ptrmode_e.
Definition: CodeView.h:353
llvm::ScopedPrinter::printNumber
virtual void printNumber(StringRef Label, uint64_t Value)
Definition: ScopedPrinter.h:202
llvm::codeview::CallingConvention::FarPascal
@ FarPascal
MemberAccessNames
static const EnumEntry< uint8_t > MemberAccessNames[]
Definition: TypeDumpVisitor.cpp:47
llvm::codeview::TypeDumpVisitor::visitMemberEnd
Error visitMemberEnd(CVMemberRecord &Record) override
Definition: TypeDumpVisitor.cpp:202
llvm::codeview::TypeServer2Record::getAge
uint32_t getAge() const
Definition: TypeRecord.h:586
llvm::codeview::PointerRecord::getMode
PointerMode getMode() const
Definition: TypeRecord.h:305
llvm::codeview::PointerRecord::isUnaligned
bool isUnaligned() const
Definition: TypeRecord.h:332
llvm::codeview::TypeDumpVisitor::visitUnknownType
Error visitUnknownType(CVType &Record) override
Action to take on unknown types. By default, they are ignored.
Definition: TypeDumpVisitor.cpp:460
llvm::codeview::TypeDumpVisitor::printTypeIndex
void printTypeIndex(StringRef FieldName, TypeIndex TI) const
Definition: TypeDumpVisitor.cpp:162
llvm::ScopedPrinter::printFlags
void printFlags(StringRef Label, T Value, ArrayRef< EnumEntry< TFlag >> Flags, TFlag EnumMask1={}, TFlag EnumMask2={}, TFlag EnumMask3={})
Definition: ScopedPrinter.h:162
llvm::codeview::MemberFunctionRecord::getThisPointerAdjustment
int32_t getThisPointerAdjustment() const
Definition: TypeRecord.h:193
llvm::codeview::TypeServer2Record
Definition: TypeRecord.h:575
llvm::codeview::TypeServer2Record::getName
StringRef getName() const
Definition: TypeRecord.h:587
LabelTypeEnum
static const EnumEntry< uint16_t > LabelTypeEnum[]
Definition: TypeDumpVisitor.cpp:144
llvm::codeview::TypeCollection::size
virtual uint32_t size()=0
llvm::codeview::EnumeratorRecord
Definition: TypeRecord.h:830
llvm::codeview::OneMethodRecord
Definition: TypeRecord.h:720
TypeRecord.h
llvm::ScopedPrinter::printEnum
void printEnum(StringRef Label, T Value, ArrayRef< EnumEntry< TEnum >> EnumValues)
Definition: ScopedPrinter.h:143
Generic
@ Generic
Definition: AArch64MCAsmInfo.cpp:23
llvm::codeview::VirtualBaseClassRecord
Definition: TypeRecord.h:885
llvm::codeview::PointerRecord::getSize
uint8_t getSize() const
Definition: TypeRecord.h:314
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::codeview::ContinuationRecordKind::FieldList
@ FieldList
llvm::HexNumber
Definition: ScopedPrinter.h:40
llvm::codeview::PointerRecord::isConst
bool isConst() const
Definition: TypeRecord.h:326
ArrayRef.h
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:374
llvm::codeview::CallingConvention::Inline
@ Inline
PtrKindNames
static const EnumEntry< uint8_t > PtrKindNames[]
Definition: TypeDumpVisitor.cpp:70
TypeDumpVisitor.h
llvm::codeview::ProcedureRecord::getParameterCount
uint16_t getParameterCount() const
Definition: TypeRecord.h:160
llvm::codeview::PointerKind::Huge16
@ Huge16
llvm::codeview::StaticDataMemberRecord
Definition: TypeRecord.h:809
llvm::codeview::CompileSym2Flags::EC
@ EC
llvm::codeview::OverloadedMethodRecord::getMethodList
TypeIndex getMethodList() const
Definition: TypeRecord.h:775
getLeafTypeName
static StringRef getLeafTypeName(TypeLeafKind LT)
Definition: TypeDumpVisitor.cpp:150
llvm::codeview::PrecompRecord::getSignature
uint32_t getSignature() const
Definition: TypeRecord.h:936
llvm::Record
Definition: Record.h:1508
llvm::codeview::PrecompRecord::getPrecompFilePath
StringRef getPrecompFilePath() const
Definition: TypeRecord.h:937
llvm::pdb::PDB_UdtType::Union
@ Union
llvm::codeview::VFTableRecord::getVFPtrOffset
uint32_t getVFPtrOffset() const
Definition: TypeRecord.h:706
llvm::codeview::FuncIdRecord
Definition: TypeRecord.h:610
MemberKindNames
static const EnumEntry< uint16_t > MemberKindNames[]
Definition: TypeDumpVisitor.cpp:60
llvm::codeview::CallingConvention::FarStdCall
@ FarStdCall
llvm::codeview::PointerKind::Near16
@ Near16
llvm::codeview::PointerKind::Near32
@ Near32
llvm::codeview::FieldListRecord
Definition: TypeRecord.h:385
llvm::codeview::OneMethodRecord::getMethodKind
MethodKind getMethodKind() const
Definition: TypeRecord.h:734
llvm::codeview::OverloadedMethodRecord::getNumOverloads
uint16_t getNumOverloads() const
Definition: TypeRecord.h:774
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::codeview::CVRecord< TypeLeafKind >
llvm::codeview::ClassOptions::HasOverloadedAssignmentOperator
@ HasOverloadedAssignmentOperator
llvm::codeview::OneMethodRecord::getAccess
MemberAccess getAccess() const
Definition: TypeRecord.h:736
llvm::codeview::PointerMode::RValueReference
@ RValueReference
llvm::codeview::ArrayRecord::getElementType
TypeIndex getElementType() const
Definition: TypeRecord.h:405
llvm::codeview::UdtSourceLineRecord
Definition: TypeRecord.h:628
uint32_t
llvm::codeview::CallingConvention::M32RCall
@ M32RCall
llvm::codeview::VFTableRecord
Definition: TypeRecord.h:691
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::ScopedPrinter::printString
virtual void printString(StringRef Value)
Definition: ScopedPrinter.h:342
llvm::pdb::PDB_SymType::Enum
@ Enum
llvm::codeview::PointerToMemberRepresentation
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
Definition: CodeView.h:376
llvm::ScopedPrinter::startLine
virtual raw_ostream & startLine()
Definition: ScopedPrinter.h:405
llvm::ifs::IFSSymbolType::Func
@ Func
llvm::codeview::PointerRecord::isLValueReferenceThisPtr
bool isLValueReferenceThisPtr() const
Definition: TypeRecord.h:340
llvm::codeview::EndPrecompRecord::getSignature
uint32_t getSignature() const
Definition: TypeRecord.h:951
llvm::codeview::CallingConvention::NearStdCall
@ NearStdCall
PtrModeNames
static const EnumEntry< uint8_t > PtrModeNames[]
Definition: TypeDumpVisitor.cpp:86
llvm::codeview::ProcedureRecord
Definition: TypeRecord.h:146
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:704
llvm::codeview::PointerKind::BasedOnSelf
@ BasedOnSelf
llvm::codeview::TypeDumpVisitor::visitTypeBegin
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
Definition: TypeDumpVisitor.cpp:170
uint16_t
LeafTypeNames
static const EnumEntry< TypeLeafKind > LeafTypeNames[]
Definition: TypeDumpVisitor.cpp:24
llvm::codeview::LabelType::Near
@ Near
llvm::codeview::MemberFunctionRecord::getParameterCount
uint16_t getParameterCount() const
Definition: TypeRecord.h:191
llvm::codeview::UnionRecord
Definition: TypeRecord.h:498
PtrMemberRepNames
static const EnumEntry< uint16_t > PtrMemberRepNames[]
Definition: TypeDumpVisitor.cpp:94
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::codeview::PointerMode::PointerToMemberFunction
@ PointerToMemberFunction
TypeCollection.h
ClassOptionNames
static const EnumEntry< uint16_t > ClassOptionNames[]
Definition: TypeDumpVisitor.cpp:32
llvm::codeview::ModifierOptions::Unaligned
@ Unaligned
llvm::codeview::PointerToMemberRepresentation::GeneralFunction
@ GeneralFunction
llvm::ScopedPrinter::indent
void indent(int Levels=1)
Definition: ScopedPrinter.h:122
llvm::codeview::LabelRecord::Mode
LabelType Mode
Definition: TypeRecord.h:213
CVTypeVisitor.h
Arguments
AMDGPU Lower Kernel Arguments
Definition: AMDGPULowerKernelArguments.cpp:243
CallingConventions
static const EnumEntry< uint8_t > CallingConventions[]
Definition: TypeDumpVisitor.cpp:111
FunctionOptionEnum
static const EnumEntry< uint8_t > FunctionOptionEnum[]
Definition: TypeDumpVisitor.cpp:138
llvm::codeview::PointerKind::BasedOnType
@ BasedOnType
visitKnownMember
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
Definition: CVTypeVisitor.cpp:34
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:52
llvm::codeview::VFPtrRecord
Definition: TypeRecord.h:851
llvm::codeview::BuildInfoRecord
Definition: TypeRecord.h:667
llvm::codeview::PointerKind::Near64
@ Near64
llvm::codeview::MemberFuncIdRecord
Definition: TypeRecord.h:217
llvm::codeview::ModifierOptions::Const
@ Const
llvm::codeview::PointerRecord::isPointerToMember
bool isPointerToMember() const
Definition: TypeRecord.h:320
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:475
llvm::codeview::CallingConvention::ArmCall
@ ArmCall
llvm::codeview::OverloadedMethodRecord::getName
StringRef getName() const
Definition: TypeRecord.h:776
ENUM_ENTRY
#define ENUM_ENTRY(enum_class, enum)
Definition: TypeDumpVisitor.cpp:29
llvm::codeview::CallingConvention::FarSysCall
@ FarSysCall
llvm::ScopedPrinter::printHex
void printHex(StringRef Label, T Value)
Definition: ScopedPrinter.h:329
llvm::codeview::ClassOptions::HasConversionOperator
@ HasConversionOperator
llvm::codeview::MemberFunctionRecord::getCallConv
CallingConvention getCallConv() const
Definition: TypeRecord.h:189
llvm::codeview::PointerRecord::isRestrict
bool isRestrict() const
Definition: TypeRecord.h:336
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:250
llvm::codeview::PointerKind::BasedOnAddress
@ BasedOnAddress
llvm::codeview::ArrayRecord
Definition: TypeRecord.h:396
llvm::codeview::PointerRecord::getMemberInfo
MemberPointerInfo getMemberInfo() const
Definition: TypeRecord.h:318
N
#define N
llvm::codeview::VFTableRecord::getName
StringRef getName() const
Definition: TypeRecord.h:707
llvm::codeview::PointerRecord::getPointerKind
PointerKind getPointerKind() const
Definition: TypeRecord.h:300
llvm::codeview::PrecompRecord::getStartTypeIndex
uint32_t getStartTypeIndex() const
Definition: TypeRecord.h:934
llvm::codeview::CallingConvention
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:178
llvm::codeview::LabelRecord
Definition: TypeRecord.h:206
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:735
llvm::codeview::OneMethodRecord::getVFTableOffset
int32_t getVFTableOffset() const
Definition: TypeRecord.h:737
llvm::codeview::PointerKind
PointerKind
Equivalent to CV_ptrtype_e.
Definition: CodeView.h:336
llvm::codeview::OneMethodRecord::getType
TypeIndex getType() const
Definition: TypeRecord.h:733
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:406
llvm::codeview::ClassRecord
Definition: TypeRecord.h:465
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:394
Mod
Module * Mod
Definition: PassBuilderBindings.cpp:54
llvm::codeview::PointerKind::Far16
@ Far16
llvm::codeview::CallingConvention::MipsCall
@ MipsCall
raw_ostream.h
llvm::AMDGPU::VGPRIndexMode::Id
Id
Definition: SIDefines.h:238
llvm::codeview::MemberPointerInfo
Definition: TypeRecord.h:100
llvm::codeview::EndPrecompRecord
Definition: TypeRecord.h:946
llvm::codeview::PointerKind::BasedOnSegment
@ BasedOnSegment
llvm::codeview::ArrayRecord::getSize
uint64_t getSize() const
Definition: TypeRecord.h:407
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:284
llvm::codeview::MemberFunctionRecord::getOptions
FunctionOptions getOptions() const
Definition: TypeRecord.h:190
ScopedPrinter.h