Home | History | Annotate | Download | only in Native
      1 //===- NativeEnumSymbol.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_NATIVEENUMSYMBOL_H
     11 #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVEENUMSYMBOL_H
     12 
     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"
     17 
     18 namespace llvm {
     19 namespace pdb {
     20 
     21 class NativeEnumSymbol : public NativeRawSymbol,
     22                          public codeview::TypeVisitorCallbacks {
     23 public:
     24   NativeEnumSymbol(NativeSession &Session, SymIndexId Id,
     25                    const codeview::CVType &CV);
     26   ~NativeEnumSymbol() override;
     27 
     28   std::unique_ptr<NativeRawSymbol> clone() const override;
     29 
     30   std::unique_ptr<IPDBEnumSymbols>
     31   findChildren(PDB_SymType Type) const override;
     32 
     33   Error visitKnownRecord(codeview::CVType &CVR,
     34                          codeview::EnumRecord &Record) override;
     35   Error visitKnownMember(codeview::CVMemberRecord &CVM,
     36                          codeview::EnumeratorRecord &Record) override;
     37 
     38   PDB_SymType getSymTag() const override;
     39   uint32_t getClassParentId() const override;
     40   uint32_t getUnmodifiedTypeId() const override;
     41   bool hasConstructor() const override;
     42   bool hasAssignmentOperator() const override;
     43   bool hasCastOperator() const override;
     44   uint64_t getLength() const override;
     45   std::string getName() const override;
     46   bool isNested() const override;
     47   bool hasOverloadedOperator() const override;
     48   bool isPacked() const override;
     49   bool isScoped() const override;
     50   uint32_t getTypeId() const override;
     51 
     52 protected:
     53   codeview::CVType CV;
     54   codeview::EnumRecord Record;
     55 };
     56 
     57 } // namespace pdb
     58 } // namespace llvm
     59 
     60 #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVEENUMSYMBOL_H
     61