LLVM  4.0.0
TypeRecord.h
Go to the documentation of this file.
1 //===- TypeRecord.h ---------------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
11 #define LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
12 
13 #include "llvm/ADT/APSInt.h"
14 #include "llvm/ADT/ArrayRef.h"
15 #include "llvm/ADT/Optional.h"
16 #include "llvm/ADT/SmallVector.h"
17 #include "llvm/ADT/StringRef.h"
22 #include "llvm/Support/Endian.h"
23 #include <algorithm>
24 #include <cstdint>
25 #include <vector>
26 
27 namespace llvm {
28 
29 namespace msf {
30 class StreamReader;
31 } // end namespace msf
32 
33 namespace codeview {
34 
38 
40 
44 };
46 
47 /// Equvalent to CV_fldattr_t in cvinfo.h.
49  uint16_t Attrs = 0;
50  enum {
52  };
53  MemberAttributes() = default;
54 
55  explicit MemberAttributes(MemberAccess Access)
56  : Attrs(static_cast<uint16_t>(Access)) {}
57 
59  Attrs = static_cast<uint16_t>(Access);
60  Attrs |= (static_cast<uint16_t>(Kind) << MethodKindShift);
61  Attrs |= static_cast<uint16_t>(Flags);
62  }
63 
64  /// Get the access specifier. Valid for any kind of member.
66  return MemberAccess(unsigned(Attrs) & unsigned(MethodOptions::AccessMask));
67  }
68 
69  /// Indicates if a method is defined with friend, virtual, static, etc.
71  return MethodKind(
72  (unsigned(Attrs) & unsigned(MethodOptions::MethodKindMask)) >>
74  }
75 
76  /// Get the flags that are not included in access control or method
77  /// properties.
79  return MethodOptions(
80  unsigned(Attrs) &
82  }
83 
84  /// Is this method virtual.
85  bool isVirtual() const {
86  auto MP = getMethodKind();
87  return MP != MethodKind::Vanilla && MP != MethodKind::Friend &&
88  MP != MethodKind::Static;
89  }
90 
91  /// Does this member introduce a new virtual method.
92  bool isIntroducedVirtual() const {
93  auto MP = getMethodKind();
94  return MP == MethodKind::IntroducingVirtual ||
96  }
97 };
98 
99 // Does not correspond to any tag, this is the tail of an LF_POINTER record
100 // if it represents a member pointer.
102 public:
103  MemberPointerInfo() = default;
104 
107  : ContainingType(ContainingType), Representation(Representation) {}
108 
109  /// Rewrite member type indices with IndexMap. Returns false if a type index
110  /// is not in the map.
111  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
112 
115  return Representation;
116  }
117 
120 };
121 
122 class TypeRecord {
123 protected:
124  TypeRecord() = default;
125  explicit TypeRecord(TypeRecordKind Kind) : Kind(Kind) {}
126 
127 public:
128  TypeRecordKind getKind() const { return Kind; }
129 
130 private:
131  TypeRecordKind Kind;
132 };
133 
134 // LF_MODIFIER
135 class ModifierRecord : public TypeRecord {
136 public:
137  explicit ModifierRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
139  : TypeRecord(TypeRecordKind::Modifier), ModifiedType(ModifiedType),
140  Modifiers(Modifiers) {}
141 
142  /// Rewrite member type indices with IndexMap. Returns false if a type index
143  /// is not in the map.
144  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
145 
148 
151 };
152 
153 // LF_PROCEDURE
154 class ProcedureRecord : public TypeRecord {
155 public:
156  explicit ProcedureRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
160  : TypeRecord(TypeRecordKind::Procedure), ReturnType(ReturnType),
161  CallConv(CallConv), Options(Options), ParameterCount(ParameterCount),
162  ArgumentList(ArgumentList) {}
163 
164  /// Rewrite member type indices with IndexMap. Returns false if a type index
165  /// is not in the map.
166  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
167 
168  TypeIndex getReturnType() const { return ReturnType; }
170  FunctionOptions getOptions() const { return Options; }
171  uint16_t getParameterCount() const { return ParameterCount; }
173 
177  uint16_t ParameterCount;
179 };
180 
181 // LF_MFUNCTION
183 public:
185 
190  : TypeRecord(TypeRecordKind::MemberFunction), ReturnType(ReturnType),
191  ClassType(ClassType), ThisType(ThisType), CallConv(CallConv),
192  Options(Options), ParameterCount(ParameterCount),
193  ArgumentList(ArgumentList),
194  ThisPointerAdjustment(ThisPointerAdjustment) {}
195 
196  /// Rewrite member type indices with IndexMap. Returns false if a type index
197  /// is not in the map.
198  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
199 
200  TypeIndex getReturnType() const { return ReturnType; }
201  TypeIndex getClassType() const { return ClassType; }
202  TypeIndex getThisType() const { return ThisType; }
204  FunctionOptions getOptions() const { return Options; }
205  uint16_t getParameterCount() const { return ParameterCount; }
208 
214  uint16_t ParameterCount;
217 };
218 
219 // LF_MFUNC_ID
221 public:
222  explicit MemberFuncIdRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
224  StringRef Name)
225  : TypeRecord(TypeRecordKind::MemberFuncId), ClassType(ClassType),
226  FunctionType(FunctionType), Name(Name) {}
227 
228  /// Rewrite member type indices with IndexMap. Returns false if a type index
229  /// is not in the map.
230  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
231 
232  TypeIndex getClassType() const { return ClassType; }
234  StringRef getName() const { return Name; }
238 };
239 
240 // LF_ARGLIST, LF_SUBSTR_LIST
241 class ArgListRecord : public TypeRecord {
242 public:
243  explicit ArgListRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
244 
246  : TypeRecord(Kind), StringIndices(Indices) {}
247 
248  /// Rewrite member type indices with IndexMap. Returns false if a type index
249  /// is not in the map.
250  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
251 
253 
254  std::vector<TypeIndex> StringIndices;
255 };
256 
257 // LF_POINTER
258 class PointerRecord : public TypeRecord {
259 public:
260  static const uint32_t PointerKindShift = 0;
261  static const uint32_t PointerKindMask = 0x1F;
262 
263  static const uint32_t PointerModeShift = 5;
264  static const uint32_t PointerModeMask = 0x07;
265 
266  static const uint32_t PointerOptionMask = 0xFF;
267 
268  static const uint32_t PointerSizeShift = 13;
269  static const uint32_t PointerSizeMask = 0xFF;
270 
271  explicit PointerRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
272 
274  : TypeRecord(TypeRecordKind::Pointer), ReferentType(ReferentType),
275  Attrs(Attrs) {}
276 
278  PointerOptions PO, uint8_t Size)
279  : TypeRecord(TypeRecordKind::Pointer), ReferentType(ReferentType),
280  Attrs(calcAttrs(PK, PM, PO, Size)) {}
281 
283  PointerOptions PO, uint8_t Size,
284  const MemberPointerInfo &Member)
285  : TypeRecord(TypeRecordKind::Pointer), ReferentType(ReferentType),
286  Attrs(calcAttrs(PK, PM, PO, Size)), MemberInfo(Member) {}
287 
289  const MemberPointerInfo &Member)
290  : TypeRecord(TypeRecordKind::Pointer), ReferentType(ReferentType),
291  Attrs(Attrs), MemberInfo(Member) {}
292 
293  /// Rewrite member type indices with IndexMap. Returns false if a type index
294  /// is not in the map.
295  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
296 
298 
300  return static_cast<PointerKind>((Attrs >> PointerKindShift) &
302  }
303 
305  return static_cast<PointerMode>((Attrs >> PointerModeShift) &
307  }
308 
310  return static_cast<PointerOptions>(Attrs);
311  }
312 
313  uint8_t getSize() const {
314  return (Attrs >> PointerSizeShift) & PointerSizeMask;
315  }
316 
318 
319  bool isPointerToMember() const {
322  }
323 
324  bool isFlat() const { return !!(Attrs & uint32_t(PointerOptions::Flat32)); }
325  bool isConst() const { return !!(Attrs & uint32_t(PointerOptions::Const)); }
326 
327  bool isVolatile() const {
329  }
330 
331  bool isUnaligned() const {
333  }
334 
337 
339 
340 private:
341  static uint32_t calcAttrs(PointerKind PK, PointerMode PM, PointerOptions PO,
342  uint8_t Size) {
343  uint32_t A = 0;
344  A |= static_cast<uint32_t>(PK);
345  A |= static_cast<uint32_t>(PO);
346  A |= (static_cast<uint32_t>(PM) << PointerModeShift);
347  A |= (static_cast<uint32_t>(Size) << PointerSizeShift);
348  return A;
349  }
350 };
351 
352 // LF_NESTTYPE
353 class NestedTypeRecord : public TypeRecord {
354 public:
355  explicit NestedTypeRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
357  : TypeRecord(TypeRecordKind::NestedType), Type(Type), Name(Name) {}
358 
359  /// Rewrite member type indices with IndexMap. Returns false if a type index
360  /// is not in the map.
361  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
362 
363  TypeIndex getNestedType() const { return Type; }
364  StringRef getName() const { return Name; }
365 
368 };
369 
370 // LF_FIELDLIST
371 class FieldListRecord : public TypeRecord {
372 public:
373  explicit FieldListRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
375  : TypeRecord(TypeRecordKind::FieldList), Data(Data) {}
376 
377  /// Rewrite member type indices with IndexMap. Returns false if a type index
378  /// is not in the map.
379  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap) { return false; }
380 
382 };
383 
384 // LF_ARRAY
385 class ArrayRecord : public TypeRecord {
386 public:
387  explicit ArrayRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
389  StringRef Name)
390  : TypeRecord(TypeRecordKind::Array), ElementType(ElementType),
391  IndexType(IndexType), Size(Size), Name(Name) {}
392 
393  /// Rewrite member type indices with IndexMap. Returns false if a type index
394  /// is not in the map.
395  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
396 
398  TypeIndex getIndexType() const { return IndexType; }
399  uint64_t getSize() const { return Size; }
400  StringRef getName() const { return Name; }
401 
404  uint64_t Size;
406 };
407 
408 class TagRecord : public TypeRecord {
409 protected:
410  explicit TagRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
413  : TypeRecord(Kind), MemberCount(MemberCount), Options(Options),
414  FieldList(FieldList), Name(Name), UniqueName(UniqueName) {}
415 
416 public:
417  /// Rewrite member type indices with IndexMap. Returns false if a type index
418  /// is not in the map.
419  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
420 
421  static const int HfaKindShift = 11;
422  static const int HfaKindMask = 0x1800;
423  static const int WinRTKindShift = 14;
424  static const int WinRTKindMask = 0xC000;
425 
426  bool hasUniqueName() const {
428  }
429 
430  uint16_t getMemberCount() const { return MemberCount; }
431  ClassOptions getOptions() const { return Options; }
432  TypeIndex getFieldList() const { return FieldList; }
433  StringRef getName() const { return Name; }
434  StringRef getUniqueName() const { return UniqueName; }
435 
436  uint16_t MemberCount;
441 };
442 
443 // LF_CLASS, LF_STRUCTURE, LF_INTERFACE
444 class ClassRecord : public TagRecord {
445 public:
446  explicit ClassRecord(TypeRecordKind Kind) : TagRecord(Kind) {}
451  : TagRecord(Kind, MemberCount, Options, FieldList, Name, UniqueName),
452  DerivationList(DerivationList), VTableShape(VTableShape), Size(Size) {}
453 
454  /// Rewrite member type indices with IndexMap. Returns false if a type index
455  /// is not in the map.
456  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
457 
458  HfaKind getHfa() const {
459  uint16_t Value = static_cast<uint16_t>(Options);
460  Value = (Value & HfaKindMask) >> HfaKindShift;
461  return static_cast<HfaKind>(Value);
462  }
463 
465  uint16_t Value = static_cast<uint16_t>(Options);
466  Value = (Value & WinRTKindMask) >> WinRTKindShift;
467  return static_cast<WindowsRTClassKind>(Value);
468  }
469 
472  uint64_t getSize() const { return Size; }
473 
476  uint64_t Size;
477 };
478 
479 // LF_UNION
480 struct UnionRecord : public TagRecord {
481  explicit UnionRecord(TypeRecordKind Kind) : TagRecord(Kind) {}
484  : TagRecord(TypeRecordKind::Union, MemberCount, Options, FieldList, Name,
485  UniqueName),
486  Size(Size) {}
487 
488  HfaKind getHfa() const {
489  uint16_t Value = static_cast<uint16_t>(Options);
490  Value = (Value & HfaKindMask) >> HfaKindShift;
491  return static_cast<HfaKind>(Value);
492  }
493 
494  uint64_t getSize() const { return Size; }
495 
496  uint64_t Size;
497 };
498 
499 // LF_ENUM
500 class EnumRecord : public TagRecord {
501 public:
502  explicit EnumRecord(TypeRecordKind Kind) : TagRecord(Kind) {}
505  : TagRecord(TypeRecordKind::Enum, MemberCount, Options, FieldList, Name,
506  UniqueName),
507  UnderlyingType(UnderlyingType) {}
508 
509  /// Rewrite member type indices with IndexMap. Returns false if a type index is not in the map.
510  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
511 
514 };
515 
516 // LF_BITFIELD
517 class BitFieldRecord : public TypeRecord {
518 public:
519  explicit BitFieldRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
521  : TypeRecord(TypeRecordKind::BitField), Type(Type), BitSize(BitSize),
522  BitOffset(BitOffset) {}
523 
524  /// Rewrite member type indices with IndexMap. Returns false if a type index
525  /// is not in the map.
526  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
527 
528  TypeIndex getType() const { return Type; }
529  uint8_t getBitOffset() const { return BitOffset; }
530  uint8_t getBitSize() const { return BitSize; }
532  uint8_t BitSize;
533  uint8_t BitOffset;
534 };
535 
536 // LF_VTSHAPE
538 public:
539  explicit VFTableShapeRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
541  : TypeRecord(TypeRecordKind::VFTableShape), SlotsRef(Slots) {}
542  explicit VFTableShapeRecord(std::vector<VFTableSlotKind> Slots)
543  : TypeRecord(TypeRecordKind::VFTableShape), Slots(std::move(Slots)) {}
544 
545  /// Rewrite member type indices with IndexMap. Returns false if a type index
546  /// is not in the map.
547  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
548 
550  if (!SlotsRef.empty())
551  return SlotsRef;
552  return Slots;
553  }
554 
555  uint32_t getEntryCount() const { return getSlots().size(); }
557  std::vector<VFTableSlotKind> Slots;
558 };
559 
560 // LF_TYPESERVER2
562 public:
563  explicit TypeServer2Record(TypeRecordKind Kind) : TypeRecord(Kind) {}
565  : TypeRecord(TypeRecordKind::TypeServer2), Guid(Guid), Age(Age),
566  Name(Name) {}
567 
568  /// Rewrite member type indices with IndexMap. Returns false if a type index
569  /// is not in the map.
570  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
571 
572  StringRef getGuid() const { return Guid; }
573 
574  uint32_t getAge() const { return Age; }
575 
576  StringRef getName() const { return Name; }
577 
581 };
582 
583 // LF_STRING_ID
584 class StringIdRecord : public TypeRecord {
585 public:
586  explicit StringIdRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
588  : TypeRecord(TypeRecordKind::StringId), Id(Id), String(String) {}
589 
590  /// Rewrite member type indices with IndexMap. Returns false if a type index
591  /// is not in the map.
592  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
593 
594  TypeIndex getId() const { return Id; }
595 
596  StringRef getString() const { return String; }
599 };
600 
601 // LF_FUNC_ID
602 class FuncIdRecord : public TypeRecord {
603 public:
604  explicit FuncIdRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
606  : TypeRecord(TypeRecordKind::FuncId), ParentScope(ParentScope),
607  FunctionType(FunctionType), Name(Name) {}
608 
609  /// Rewrite member type indices with IndexMap. Returns false if a type index
610  /// is not in the map.
611  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
612 
614 
616 
617  StringRef getName() const { return Name; }
618 
622 };
623 
624 // LF_UDT_SRC_LINE
626 public:
629  : TypeRecord(TypeRecordKind::UdtSourceLine), UDT(UDT),
630  SourceFile(SourceFile), LineNumber(LineNumber) {}
631 
632  /// Rewrite member type indices with IndexMap. Returns false if a type index
633  /// is not in the map.
634  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
635 
636  TypeIndex getUDT() const { return UDT; }
637  TypeIndex getSourceFile() const { return SourceFile; }
638  uint32_t getLineNumber() const { return LineNumber; }
639 
643 };
644 
645 // LF_UDT_MOD_SRC_LINE
647 public:
650  uint32_t LineNumber, uint16_t Module)
651  : TypeRecord(TypeRecordKind::UdtSourceLine), UDT(UDT),
652  SourceFile(SourceFile), LineNumber(LineNumber), Module(Module) {}
653 
654  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
655 
656  TypeIndex getUDT() const { return UDT; }
657  TypeIndex getSourceFile() const { return SourceFile; }
658  uint32_t getLineNumber() const { return LineNumber; }
659  uint16_t getModule() const { return Module; }
660 
664  uint16_t Module;
665 };
666 
667 // LF_BUILDINFO
668 class BuildInfoRecord : public TypeRecord {
669 public:
670  explicit BuildInfoRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
672  : TypeRecord(TypeRecordKind::BuildInfo),
673  ArgIndices(ArgIndices.begin(), ArgIndices.end()) {}
674 
675  /// Rewrite member type indices with IndexMap. Returns false if a type index
676  /// is not in the map.
677  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
678 
681 };
682 
683 // LF_VFTABLE
684 class VFTableRecord : public TypeRecord {
685 public:
686  explicit VFTableRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
689  ArrayRef<StringRef> Methods)
690  : TypeRecord(TypeRecordKind::VFTable), CompleteClass(CompleteClass),
691  OverriddenVFTable(OverriddenVFTable), VFPtrOffset(VFPtrOffset) {
692  MethodNames.push_back(Name);
693  MethodNames.insert(MethodNames.end(), Methods.begin(), Methods.end());
694  }
695 
696  /// Rewrite member type indices with IndexMap. Returns false if a type index
697  /// is not in the map.
698  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
699 
702  uint32_t getVFPtrOffset() const { return VFPtrOffset; }
703  StringRef getName() const { return makeArrayRef(MethodNames).front(); }
705  return makeArrayRef(MethodNames).drop_front();
706  }
707 
711  std::vector<StringRef> MethodNames;
712 };
713 
714 // LF_ONEMETHOD
715 class OneMethodRecord : public TypeRecord {
716 public:
718  explicit OneMethodRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
720  StringRef Name)
721  : TypeRecord(TypeRecordKind::OneMethod), Type(Type), Attrs(Attrs),
722  VFTableOffset(VFTableOffset), Name(Name) {}
724  MethodOptions Options, int32_t VFTableOffset, StringRef Name)
725  : TypeRecord(TypeRecordKind::OneMethod), Type(Type),
726  Attrs(Access, MK, Options), VFTableOffset(VFTableOffset), Name(Name) {}
727 
728  /// Rewrite member type indices with IndexMap. Returns false if a type index
729  /// is not in the map.
730  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
731 
732  TypeIndex getType() const { return Type; }
734  MethodOptions getOptions() const { return Attrs.getFlags(); }
735  MemberAccess getAccess() const { return Attrs.getAccess(); }
736  int32_t getVFTableOffset() const { return VFTableOffset; }
737  StringRef getName() const { return Name; }
738 
739  bool isIntroducingVirtual() const {
742  }
743 
746  int32_t VFTableOffset;
748 };
749 
750 // LF_METHODLIST
752 public:
755  : TypeRecord(TypeRecordKind::MethodOverloadList), Methods(Methods) {}
756 
757  /// Rewrite member type indices with IndexMap. Returns false if a type index
758  /// is not in the map.
759  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
760 
762  std::vector<OneMethodRecord> Methods;
763 };
764 
765 /// For method overload sets. LF_METHOD
767 public:
770  StringRef Name)
771  : TypeRecord(TypeRecordKind::OverloadedMethod),
772  NumOverloads(NumOverloads), MethodList(MethodList), Name(Name) {}
773 
774  /// Rewrite member type indices with IndexMap. Returns false if a type index
775  /// is not in the map.
776  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
777 
778  uint16_t getNumOverloads() const { return NumOverloads; }
779  TypeIndex getMethodList() const { return MethodList; }
780  StringRef getName() const { return Name; }
781  uint16_t NumOverloads;
784 };
785 
786 // LF_MEMBER
787 class DataMemberRecord : public TypeRecord {
788 public:
789  explicit DataMemberRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
791  StringRef Name)
792  : TypeRecord(TypeRecordKind::DataMember), Attrs(Attrs), Type(Type),
793  FieldOffset(Offset), Name(Name) {}
795  StringRef Name)
796  : TypeRecord(TypeRecordKind::DataMember), Attrs(Access), Type(Type),
797  FieldOffset(Offset), Name(Name) {}
798 
799  /// Rewrite member type indices with IndexMap. Returns false if a type index
800  /// is not in the map.
801  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
802 
803  MemberAccess getAccess() const { return Attrs.getAccess(); }
804  TypeIndex getType() const { return Type; }
805  uint64_t getFieldOffset() const { return FieldOffset; }
806  StringRef getName() const { return Name; }
807 
810  uint64_t FieldOffset;
812 };
813 
814 // LF_STMEMBER
816 public:
819  : TypeRecord(TypeRecordKind::StaticDataMember), Attrs(Attrs), Type(Type),
820  Name(Name) {}
822  : TypeRecord(TypeRecordKind::StaticDataMember), Attrs(Access), Type(Type),
823  Name(Name) {}
824 
825  /// Rewrite member type indices with IndexMap. Returns false if a type index
826  /// is not in the map.
827  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
828 
829  MemberAccess getAccess() const { return Attrs.getAccess(); }
830  TypeIndex getType() const { return Type; }
831  StringRef getName() const { return Name; }
832 
836 };
837 
838 // LF_ENUMERATE
839 class EnumeratorRecord : public TypeRecord {
840 public:
841  explicit EnumeratorRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
843  : TypeRecord(TypeRecordKind::Enumerator), Attrs(Attrs),
844  Value(std::move(Value)), Name(Name) {}
847  Value(std::move(Value)), Name(Name) {}
848 
849  /// Rewrite member type indices with IndexMap. Returns false if a type index
850  /// is not in the map.
851  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
852 
853  MemberAccess getAccess() const { return Attrs.getAccess(); }
854  APSInt getValue() const { return Value; }
855  StringRef getName() const { return Name; }
856 
860 };
861 
862 // LF_VFUNCTAB
863 class VFPtrRecord : public TypeRecord {
864 public:
865  explicit VFPtrRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
867  : TypeRecord(TypeRecordKind::VFPtr), Type(Type) {}
868 
869  /// Rewrite member type indices with IndexMap. Returns false if a type index
870  /// is not in the map.
871  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
872 
873  TypeIndex getType() const { return Type; }
874 
876 };
877 
878 // LF_BCLASS, LF_BINTERFACE
879 class BaseClassRecord : public TypeRecord {
880 public:
881  explicit BaseClassRecord(TypeRecordKind Kind) : TypeRecord(Kind) {}
883  : TypeRecord(TypeRecordKind::BaseClass), Attrs(Attrs), Type(Type),
884  Offset(Offset) {}
886  : TypeRecord(TypeRecordKind::BaseClass), Attrs(Access), Type(Type),
887  Offset(Offset) {}
888 
889  /// Rewrite member type indices with IndexMap. Returns false if a type index
890  /// is not in the map.
891  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
892 
893  MemberAccess getAccess() const { return Attrs.getAccess(); }
894  TypeIndex getBaseType() const { return Type; }
895  uint64_t getBaseOffset() const { return Offset; }
896 
899  uint64_t Offset;
900 };
901 
902 // LF_VBCLASS, LF_IVBCLASS
904 public:
908  uint64_t Offset, uint64_t Index)
909  : TypeRecord(Kind), Attrs(Attrs), BaseType(BaseType),
910  VBPtrType(VBPtrType), VBPtrOffset(Offset), VTableIndex(Index) {}
913  uint64_t Offset, uint64_t Index)
914  : TypeRecord(Kind), Attrs(Access), BaseType(BaseType),
915  VBPtrType(VBPtrType), VBPtrOffset(Offset), VTableIndex(Index) {}
916 
917  /// Rewrite member type indices with IndexMap. Returns false if a type index
918  /// is not in the map.
919  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
920 
921  MemberAccess getAccess() const { return Attrs.getAccess(); }
922  TypeIndex getBaseType() const { return BaseType; }
923  TypeIndex getVBPtrType() const { return VBPtrType; }
924  uint64_t getVBPtrOffset() const { return VBPtrOffset; }
925  uint64_t getVTableIndex() const { return VTableIndex; }
926 
930  uint64_t VBPtrOffset;
931  uint64_t VTableIndex;
932 };
933 
934 /// LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records
935 /// together. The first will end in an LF_INDEX record that points to the next.
937 public:
940  : TypeRecord(TypeRecordKind::ListContinuation),
941  ContinuationIndex(ContinuationIndex) {}
942 
944 
945  bool remapTypeIndices(ArrayRef<TypeIndex> IndexMap);
946 
948 };
949 
950 } // end namespace codeview
951 
952 } // end namespace llvm
953 
954 #endif // LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
PointerKind
Equivalent to CV_ptrtype_e.
Definition: CodeView.h:309
const_iterator end(StringRef path)
Get end iterator over path.
Definition: Path.cpp:241
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap. Returns false if a type index is not in the map...
Definition: TypeRecord.cpp:108
CallingConvention getCallConv() const
Definition: TypeRecord.h:203
UdtSourceLineRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:627
MemberAttributes(MemberAccess Access)
Definition: TypeRecord.h:55
StringRef getName() const
Definition: TypeRecord.h:364
TypeIndex getBaseType() const
Definition: TypeRecord.h:894
VirtualBaseClassRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:905
TypeIndex getArgumentList() const
Definition: TypeRecord.h:172
BuildInfoRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:670
TypeIndex getSourceFile() const
Definition: TypeRecord.h:637
HfaKind getHfa() const
Definition: TypeRecord.h:458
MemberFunctionRecord(TypeIndex ReturnType, TypeIndex ClassType, TypeIndex ThisType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList, int32_t ThisPointerAdjustment)
Definition: TypeRecord.h:186
MethodKind getMethodKind() const
Definition: TypeRecord.h:733
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:52
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
Definition: CodeView.h:28
TagRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, StringRef Name, StringRef UniqueName)
Definition: TypeRecord.h:411
MethodOverloadListRecord(ArrayRef< OneMethodRecord > Methods)
Definition: TypeRecord.h:754
static const uint32_t PointerSizeMask
Definition: TypeRecord.h:269
StaticDataMemberRecord(MemberAttributes Attrs, TypeIndex Type, StringRef Name)
Definition: TypeRecord.h:818
ArrayRef< uint8_t > Data
Definition: TypeRecord.h:43
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAttributes Attrs, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
Definition: TypeRecord.h:906
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.h:379
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:100
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:184
MethodOptions getFlags() const
Get the flags that are not included in access control or method properties.
Definition: TypeRecord.h:78
MethodOptions getOptions() const
Definition: TypeRecord.h:734
iterator end() const
Definition: ArrayRef.h:130
WindowsRTClassKind getWinRTKind() const
Definition: TypeRecord.h:464
StringIdRecord(TypeIndex Id, StringRef String)
Definition: TypeRecord.h:587
ArrayRef< TypeIndex > getArgs() const
Definition: TypeRecord.h:679
BuildInfoRecord(ArrayRef< TypeIndex > ArgIndices)
Definition: TypeRecord.h:671
NestedTypeRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:355
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:123
OverloadedMethodRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:768
PointerRecord(TypeIndex ReferentType, uint32_t Attrs)
Definition: TypeRecord.h:273
ClassRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, TypeIndex DerivationList, TypeIndex VTableShape, uint64_t Size, StringRef Name, StringRef UniqueName)
Definition: TypeRecord.h:447
TypeIndex getElementType() const
Definition: TypeRecord.h:397
const_iterator begin(StringRef path)
Get begin iterator over path.
Definition: Path.cpp:233
FieldListRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:373
FieldListRecord(ArrayRef< uint8_t > Data)
Definition: TypeRecord.h:374
ArrayRef< uint8_t > Data
Definition: TypeRecord.h:381
PointerRecord(TypeIndex ReferentType, uint32_t Attrs, const MemberPointerInfo &Member)
Definition: TypeRecord.h:288
static const uint32_t PointerSizeShift
Definition: TypeRecord.h:268
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:131
TypeServer2Record(TypeRecordKind Kind)
Definition: TypeRecord.h:563
BitFieldRecord(TypeIndex Type, uint8_t BitSize, uint8_t BitOffset)
Definition: TypeRecord.h:520
std::vector< TypeIndex > StringIndices
Definition: TypeRecord.h:254
TypeIndex getFunctionType() const
Definition: TypeRecord.h:233
OneMethodRecord(TypeIndex Type, MemberAttributes Attrs, int32_t VFTableOffset, StringRef Name)
Definition: TypeRecord.h:719
BitFieldRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:519
ArgListRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:243
TypeIndex getOverriddenVTable() const
Definition: TypeRecord.h:701
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:119
CallingConvention getCallConv() const
Definition: TypeRecord.h:169
OneMethodRecord(TypeIndex Type, MemberAccess Access, MethodKind MK, MethodOptions Options, int32_t VFTableOffset, StringRef Name)
Definition: TypeRecord.h:723
EnumRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, StringRef Name, StringRef UniqueName, TypeIndex UnderlyingType)
Definition: TypeRecord.h:503
MemberFunctionRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:184
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:39
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size)
Definition: TypeRecord.h:277
TypeIndex getId() const
Definition: TypeRecord.h:594
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:73
DataMemberRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset, StringRef Name)
Definition: TypeRecord.h:790
ArgListRecord(TypeRecordKind Kind, ArrayRef< TypeIndex > Indices)
Definition: TypeRecord.h:245
uint64_t getBaseOffset() const
Definition: TypeRecord.h:895
TypeRecordKind getKind() const
Definition: TypeRecord.h:128
struct fuzzer::@269 Flags
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:440
MemberAccess getAccess() const
Definition: TypeRecord.h:893
StringRef getString() const
Definition: TypeRecord.h:596
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:59
bool isPointerToMember() const
Definition: TypeRecord.h:319
ArrayRef< VFTableSlotKind > SlotsRef
Definition: TypeRecord.h:556
StringRef getName() const
Definition: TypeRecord.h:400
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:50
bool isIntroducingVirtual() const
Definition: TypeRecord.h:739
CVRecord< TypeLeafKind > CVType
Definition: TypeRecord.h:39
TypeIndex getParentScope() const
Definition: TypeRecord.h:613
TypeIndex getContainingType() const
Definition: TypeRecord.h:113
Class to represent function types.
Definition: DerivedTypes.h:102
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAccess Access, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
Definition: TypeRecord.h:911
OneMethodRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:718
HfaKind getHfa() const
Definition: TypeRecord.h:488
ModifierOptions
Equivalent to CV_modifier_t.
Definition: CodeView.h:280
uint16_t getMemberCount() const
Definition: TypeRecord.h:430
A 32-bit type reference.
Definition: TypeIndex.h:89
UdtSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber)
Definition: TypeRecord.h:628
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:85
VFTableRecord(TypeIndex CompleteClass, TypeIndex OverriddenVFTable, uint32_t VFPtrOffset, StringRef Name, ArrayRef< StringRef > Methods)
Definition: TypeRecord.h:687
TypeIndex getFunctionType() const
Definition: TypeRecord.h:615
uint16_t getParameterCount() const
Definition: TypeRecord.h:171
MemberAccess getAccess() const
Definition: TypeRecord.h:853
MethodKind
Part of member attribute flags. (CV_methodprop_e)
Definition: CodeView.h:255
ModifierRecord(TypeIndex ModifiedType, ModifierOptions Modifiers)
Definition: TypeRecord.h:138
StringRef getName() const
Definition: TypeRecord.h:806
TypeIndex getReturnType() const
Definition: TypeRecord.h:168
size_t size() const
size - Get the array size.
Definition: ArrayRef.h:141
ModifierRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:137
EnumeratorRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:841
StringRef getName() const
Definition: TypeRecord.h:737
TypeIndex getContinuationIndex() const
Definition: TypeRecord.h:943
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:89
VFTableRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:686
TypeRecordKind
Distinguishes individual records in .debug$T section or PDB type stream.
Definition: CodeView.h:21
static const int WinRTKindMask
Definition: TypeRecord.h:424
static const uint32_t PointerKindMask
Definition: TypeRecord.h:261
ListContinuationRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:938
static const uint32_t PointerKindShift
Definition: TypeRecord.h:260
bool isVirtual() const
Is this method virtual.
Definition: TypeRecord.h:85
PointerToMemberRepresentation getRepresentation() const
Definition: TypeRecord.h:114
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:166
bool hasUniqueName() const
Definition: TypeRecord.h:426
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
PointerRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:271
Optional< MemberPointerInfo > MemberInfo
Definition: TypeRecord.h:338
NestedTypeRecord(TypeIndex Type, StringRef Name)
Definition: TypeRecord.h:356
TypeServer2Record(StringRef Guid, uint32_t Age, StringRef Name)
Definition: TypeRecord.h:564
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:127
StringRef getName() const
Definition: TypeRecord.h:855
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
Definition: TypeRecord.h:936
TypeIndex getType() const
Definition: TypeRecord.h:732
uint8_t getSize() const
Definition: TypeRecord.h:313
FuncIdRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:604
TypeIndex getType() const
Definition: TypeRecord.h:804
ArrayRef< OneMethodRecord > getMethods() const
Definition: TypeRecord.h:761
TagRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:410
static const int WinRTKindShift
Definition: TypeRecord.h:423
For method overload sets. LF_METHOD.
Definition: TypeRecord.h:766
OverloadedMethodRecord(uint16_t NumOverloads, TypeIndex MethodList, StringRef Name)
Definition: TypeRecord.h:769
uint32_t Offset
StringRef getName() const
Definition: TypeRecord.h:703
FuncIdRecord(TypeIndex ParentScope, TypeIndex FunctionType, StringRef Name)
Definition: TypeRecord.h:605
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:152
iterator begin() const
Definition: ArrayRef.h:129
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:196
uint8_t getBitSize() const
Definition: TypeRecord.h:530
std::vector< StringRef > MethodNames
Definition: TypeRecord.h:711
ArrayRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:387
FunctionOptions getOptions() const
Definition: TypeRecord.h:204
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:204
bool empty() const
empty - Check if the array is empty.
Definition: ArrayRef.h:136
UdtModSourceLineRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:648
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:188
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:200
bool isIntroducedVirtual() const
Does this member introduce a new virtual method.
Definition: TypeRecord.h:92
ArrayRef< StringRef > getMethodNames() const
Definition: TypeRecord.h:704
BaseClassRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset)
Definition: TypeRecord.h:882
ListContinuationRecord(TypeIndex ContinuationIndex)
Definition: TypeRecord.h:939
MemberAccess getAccess() const
Get the access specifier. Valid for any kind of member.
Definition: TypeRecord.h:65
uint64_t getSize() const
Definition: TypeRecord.h:472
ModifierOptions getModifiers() const
Definition: TypeRecord.h:147
ProcedureRecord(TypeIndex ReturnType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList)
Definition: TypeRecord.h:157
ClassOptions getOptions() const
Definition: TypeRecord.h:431
PointerOptions
Equivalent to misc lfPointerAttr bitfields.
Definition: CodeView.h:335
MethodOverloadListRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:753
detail::packed_endian_specific_integral< int32_t, little, unaligned > little32_t
Definition: Endian.h:242
uint64_t getSize() const
Definition: TypeRecord.h:494
TypeIndex getCompleteClass() const
Definition: TypeRecord.h:700
UnionRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, uint64_t Size, StringRef Name, StringRef UniqueName)
Definition: TypeRecord.h:482
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:77
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:843
StaticDataMemberRecord(MemberAccess Access, TypeIndex Type, StringRef Name)
Definition: TypeRecord.h:821
TypeIndex getIndexType() const
Definition: TypeRecord.h:398
CallingConvention CallConv
Definition: TypeRecord.h:175
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:43
TypeIndex getClassType() const
Definition: TypeRecord.h:232
MemberAccess getAccess() const
Definition: TypeRecord.h:803
PointerMode getMode() const
Definition: TypeRecord.h:304
DataMemberRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset, StringRef Name)
Definition: TypeRecord.h:794
MethodKind getMethodKind() const
Indicates if a method is defined with friend, virtual, static, etc.
Definition: TypeRecord.h:70
EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name)
Definition: TypeRecord.h:845
TypeRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:125
PointerMode
Equivalent to CV_ptrmode_e.
Definition: CodeView.h:326
VFTableShapeRecord(ArrayRef< VFTableSlotKind > Slots)
Definition: TypeRecord.h:540
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:138
TypeIndex getVTableShape() const
Definition: TypeRecord.h:471
static const uint32_t PointerModeMask
Definition: TypeRecord.h:264
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:115
MemberFuncIdRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:222
detail::packed_endian_specific_integral< uint16_t, little, unaligned > ulittle16_t
Definition: Endian.h:233
ClassRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:446
MethodOptions
Equivalent to CV_fldattr_t bitfield.
Definition: CodeView.h:266
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Definition: TypeRecord.cpp:211
TypeIndex getFieldList() const
Definition: TypeRecord.h:432
static const uint32_t PointerOptionMask
Definition: TypeRecord.h:266
std::vector< OneMethodRecord > Methods
Definition: TypeRecord.h:762
static const uint32_t PointerModeShift
Definition: TypeRecord.h:263
MemberFuncIdRecord(TypeIndex ClassType, TypeIndex FunctionType, StringRef Name)
Definition: TypeRecord.h:223
static const int HfaKindShift
Definition: TypeRecord.h:421
TypeIndex getModifiedType() const
Definition: TypeRecord.h:146
VFTableShapeRecord(std::vector< VFTableSlotKind > Slots)
Definition: TypeRecord.h:542
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:66
ArrayRef< TypeIndex > getIndices() const
Definition: TypeRecord.h:252
TypeIndex getArgumentList() const
Definition: TypeRecord.h:206
SmallVector< TypeIndex, 4 > ArgIndices
Definition: TypeRecord.h:680
StringRef getName() const
Definition: TypeRecord.h:433
msf::VarStreamArray< CVType > CVTypeArray
Definition: TypeRecord.h:45
FunctionOptions getOptions() const
Definition: TypeRecord.h:170
uint32_t getVFPtrOffset() const
Definition: TypeRecord.h:702
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:159
VFTableShapeRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:539
StaticDataMemberRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:817
MemberPointerInfo getMemberInfo() const
Definition: TypeRecord.h:317
ArrayRecord(TypeIndex ElementType, TypeIndex IndexType, uint64_t Size, StringRef Name)
Definition: TypeRecord.h:388
TypeIndex getType() const
Definition: TypeRecord.h:528
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:172
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size, const MemberPointerInfo &Member)
Definition: TypeRecord.h:282
EnumeratorRecord(MemberAttributes Attrs, APSInt Value, StringRef Name)
Definition: TypeRecord.h:842
TypeIndex getNestedType() const
Definition: TypeRecord.h:363
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
Definition: CodeView.h:347
VFPtrRecord(TypeIndex Type)
Definition: TypeRecord.h:866
PointerKind getPointerKind() const
Definition: TypeRecord.h:299
ProcedureRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:156
StringIdRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:586
const unsigned Kind
MemberAccess
Source-level access specifier. (CV_access_e)
Definition: CodeView.h:247
DataMemberRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:789
uint64_t getSize() const
Definition: TypeRecord.h:399
std::vector< VFTableSlotKind > Slots
Definition: TypeRecord.h:557
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
Definition: Endian.h:235
BaseClassRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset)
Definition: TypeRecord.h:885
uint64_t getFieldOffset() const
Definition: TypeRecord.h:805
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Definition: TypeRecord.cpp:145
uint8_t getBitOffset() const
Definition: TypeRecord.h:529
BaseClassRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:881
Equvalent to CV_fldattr_t in cvinfo.h.
Definition: TypeRecord.h:48
UnionRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:481
LLVM Value Representation.
Definition: Value.h:71
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:192
EnumRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:502
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:162
ArrayRef< VFTableSlotKind > getSlots() const
Definition: TypeRecord.h:549
PointerOptions getOptions() const
Definition: TypeRecord.h:309
VFPtrRecord(TypeRecordKind Kind)
Definition: TypeRecord.h:865
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:96
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47
TypeIndex getUnderlyingType() const
Definition: TypeRecord.h:512
StringRef getUniqueName() const
Definition: TypeRecord.h:434
int32_t getVFTableOffset() const
Definition: TypeRecord.h:736
TypeIndex getType() const
Definition: TypeRecord.h:873
MemberAccess getAccess() const
Definition: TypeRecord.h:735
int32_t getThisPointerAdjustment() const
Definition: TypeRecord.h:207
bool remapTypeIndices(ArrayRef< TypeIndex > IndexMap)
Rewrite member type indices with IndexMap.
Definition: TypeRecord.cpp:180
UdtModSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber, uint16_t Module)
Definition: TypeRecord.h:649
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")
TypeIndex getDerivationList() const
Definition: TypeRecord.h:470
MemberPointerInfo(TypeIndex ContainingType, PointerToMemberRepresentation Representation)
Definition: TypeRecord.h:105
MemberAttributes(MemberAccess Access, MethodKind Kind, MethodOptions Flags)
Definition: TypeRecord.h:58
PointerToMemberRepresentation Representation
Definition: TypeRecord.h:119
TypeIndex getReferentType() const
Definition: TypeRecord.h:297
StringRef getName() const
Definition: TypeRecord.h:617
static const int HfaKindMask
Definition: TypeRecord.h:422