]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h
Vendor import of llvm trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / include / llvm / DebugInfo / PDB / Native / NativeTypeEnum.h
1 //===- NativeTypeEnum.h - info about enum type ------------------*- 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_PDB_NATIVE_NATIVETYPEENUM_H
11 #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEENUM_H
12
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/DebugInfo/CodeView/CodeView.h"
15 #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
16 #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
17 #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
18
19 namespace llvm {
20 namespace pdb {
21
22 class NativeTypeBuiltin;
23
24 class NativeTypeEnum : public NativeRawSymbol {
25 public:
26   NativeTypeEnum(NativeSession &Session, SymIndexId Id, codeview::TypeIndex TI,
27                  codeview::EnumRecord Record);
28
29   NativeTypeEnum(NativeSession &Session, SymIndexId Id,
30                  NativeTypeEnum &UnmodifiedType,
31                  codeview::ModifierRecord Modifier);
32   ~NativeTypeEnum() override;
33
34   void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
35             PdbSymbolIdField RecurseIdFields) const override;
36
37   std::unique_ptr<IPDBEnumSymbols>
38   findChildren(PDB_SymType Type) const override;
39
40   PDB_BuiltinType getBuiltinType() const override;
41   PDB_SymType getSymTag() const override;
42   SymIndexId getUnmodifiedTypeId() const override;
43   bool hasConstructor() const override;
44   bool hasAssignmentOperator() const override;
45   bool hasCastOperator() const override;
46   uint64_t getLength() const override;
47   std::string getName() const override;
48   bool isConstType() const override;
49   bool isVolatileType() const override;
50   bool isUnalignedType() const override;
51   bool isNested() const override;
52   bool hasOverloadedOperator() const override;
53   bool hasNestedTypes() const override;
54   bool isIntrinsic() const override;
55   bool isPacked() const override;
56   bool isScoped() const override;
57   SymIndexId getTypeId() const override;
58   bool isRefUdt() const override;
59   bool isValueUdt() const override;
60   bool isInterfaceUdt() const override;
61
62   const NativeTypeBuiltin &getUnderlyingBuiltinType() const;
63   const codeview::EnumRecord &getEnumRecord() const { return *Record; }
64
65 protected:
66   codeview::TypeIndex Index;
67   Optional<codeview::EnumRecord> Record;
68   NativeTypeEnum *UnmodifiedType = nullptr;
69   Optional<codeview::ModifierRecord> Modifiers;
70 };
71
72 } // namespace pdb
73 } // namespace llvm
74
75 #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEENUM_H