NativeTypePointer.h revision 343171
1153317Ssam//===- NativeTypePointer.h - info about pointer type -------------*- C++-*-===//
2153317Ssam//
3153317Ssam//                     The LLVM Compiler Infrastructure
4153317Ssam//
5153317Ssam// This file is distributed under the University of Illinois Open Source
6153317Ssam// License. See LICENSE.TXT for details.
7153317Ssam//
8153317Ssam//===----------------------------------------------------------------------===//
9153317Ssam
10153317Ssam#ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEPOINTER_H
11153317Ssam#define LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEPOINTER_H
12153317Ssam
13153317Ssam#include "llvm/ADT/Optional.h"
14153317Ssam#include "llvm/DebugInfo/CodeView/CodeView.h"
15153317Ssam#include "llvm/DebugInfo/CodeView/TypeRecord.h"
16153317Ssam#include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
17153317Ssam#include "llvm/DebugInfo/PDB/Native/NativeSession.h"
18153317Ssam
19153317Ssamnamespace llvm {
20153317Ssamnamespace pdb {
21153317Ssam
22153317Ssamclass NativeTypePointer : public NativeRawSymbol {
23153317Ssampublic:
24153317Ssam  // Create a pointer record for a simple type.
25153317Ssam  NativeTypePointer(NativeSession &Session, SymIndexId Id,
26153317Ssam                    codeview::TypeIndex TI);
27153317Ssam
28153317Ssam  // Create a pointer record for a non-simple type.
29153317Ssam  NativeTypePointer(NativeSession &Session, SymIndexId Id,
30153317Ssam                    codeview::TypeIndex TI, codeview::PointerRecord PR);
31153317Ssam  ~NativeTypePointer() override;
32153317Ssam
33153317Ssam  void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
34153317Ssam            PdbSymbolIdField RecurseIdFields) const override;
35153317Ssam
36153317Ssam  SymIndexId getClassParentId() const override;
37153317Ssam  bool isConstType() const override;
38153317Ssam  uint64_t getLength() const override;
39153317Ssam  bool isReference() const override;
40153317Ssam  bool isRValueReference() const override;
41153317Ssam  bool isPointerToDataMember() const override;
42153317Ssam  bool isPointerToMemberFunction() const override;
43153317Ssam  SymIndexId getTypeId() const override;
44153317Ssam  bool isRestrictedType() const override;
45153317Ssam  bool isVolatileType() const override;
46170534Ssam  bool isUnalignedType() const override;
47153317Ssam
48153317Ssam  bool isSingleInheritance() const override;
49153317Ssam  bool isMultipleInheritance() const override;
50170534Ssam  bool isVirtualInheritance() const override;
51153317Ssam
52153317Ssamprotected:
53153317Ssam  bool isMemberPointer() const;
54153317Ssam  codeview::TypeIndex TI;
55153317Ssam  Optional<codeview::PointerRecord> Record;
56170534Ssam};
57153317Ssam
58153317Ssam} // namespace pdb
59153317Ssam} // namespace llvm
60153317Ssam
61153317Ssam#endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEPOINTER_H