1 //===- NativeTypeEnum.h - info about enum type ------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEENUM_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEENUM_H
12 #include "llvm/ADT/Optional.h"
13 #include "llvm/DebugInfo/CodeView/CodeView.h"
14 #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
15 #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
16 #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
21 class NativeTypeBuiltin;
23 class NativeTypeEnum : public NativeRawSymbol {
25 NativeTypeEnum(NativeSession &Session, SymIndexId Id, codeview::TypeIndex TI,
26 codeview::EnumRecord Record);
28 NativeTypeEnum(NativeSession &Session, SymIndexId Id,
29 NativeTypeEnum &UnmodifiedType,
30 codeview::ModifierRecord Modifier);
31 ~NativeTypeEnum() override;
33 void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
34 PdbSymbolIdField RecurseIdFields) const override;
36 std::unique_ptr<IPDBEnumSymbols>
37 findChildren(PDB_SymType Type) const override;
39 PDB_BuiltinType getBuiltinType() const override;
40 PDB_SymType getSymTag() const override;
41 SymIndexId getUnmodifiedTypeId() const override;
42 bool hasConstructor() const override;
43 bool hasAssignmentOperator() const override;
44 bool hasCastOperator() const override;
45 uint64_t getLength() const override;
46 std::string getName() const override;
47 bool isConstType() const override;
48 bool isVolatileType() const override;
49 bool isUnalignedType() const override;
50 bool isNested() const override;
51 bool hasOverloadedOperator() const override;
52 bool hasNestedTypes() const override;
53 bool isIntrinsic() const override;
54 bool isPacked() const override;
55 bool isScoped() const override;
56 SymIndexId getTypeId() const override;
57 bool isRefUdt() const override;
58 bool isValueUdt() const override;
59 bool isInterfaceUdt() const override;
61 const NativeTypeBuiltin &getUnderlyingBuiltinType() const;
62 const codeview::EnumRecord &getEnumRecord() const { return *Record; }
65 codeview::TypeIndex Index;
66 Optional<codeview::EnumRecord> Record;
67 NativeTypeEnum *UnmodifiedType = nullptr;
68 Optional<codeview::ModifierRecord> Modifiers;
74 #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEENUM_H