1 //===- NativeTypeFunctionSig.h - info about function signature ---*- 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_NATIVETYPEFUNCTIONSIG_H 11 #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEFUNCTIONSIG_H 12 13 #include "llvm/ADT/Optional.h" 14 #include "llvm/ADT/SmallVector.h" 15 #include "llvm/DebugInfo/CodeView/CodeView.h" 16 #include "llvm/DebugInfo/CodeView/TypeRecord.h" 17 #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h" 18 #include "llvm/DebugInfo/PDB/Native/NativeSession.h" 19 20 namespace llvm { 21 namespace pdb { 22 23 class NativeTypeUDT; 24 25 class NativeTypeFunctionSig : public NativeRawSymbol { 26 protected: 27 void initialize() override; 28 29 public: 30 NativeTypeFunctionSig(NativeSession &Session, SymIndexId Id, 31 codeview::TypeIndex TI, codeview::ProcedureRecord Proc); 32 33 NativeTypeFunctionSig(NativeSession &Session, SymIndexId Id, 34 codeview::TypeIndex TI, 35 codeview::MemberFunctionRecord MemberFunc); 36 37 ~NativeTypeFunctionSig() override; 38 39 void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, 40 PdbSymbolIdField RecurseIdFields) const override; 41 42 std::unique_ptr<IPDBEnumSymbols> 43 findChildren(PDB_SymType Type) const override; 44 45 SymIndexId getClassParentId() const override; 46 PDB_CallingConv getCallingConvention() const override; 47 uint32_t getCount() const override; 48 SymIndexId getTypeId() const override; 49 int32_t getThisAdjust() const override; 50 bool hasConstructor() const override; 51 bool isConstType() const override; 52 bool isConstructorVirtualBase() const override; 53 bool isCxxReturnUdt() const override; 54 bool isUnalignedType() const override; 55 bool isVolatileType() const override; 56 57 private: 58 void initializeArgList(codeview::TypeIndex ArgListTI); 59 60 union { 61 codeview::MemberFunctionRecord MemberFunc; 62 codeview::ProcedureRecord Proc; 63 }; 64 65 SymIndexId ClassParentId = 0; 66 codeview::TypeIndex Index; 67 codeview::ArgListRecord ArgList; 68 bool IsMemberFunction = false; 69 }; 70 71 } // namespace pdb 72 } // namespace llvm 73 74 #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVETYPEPOINTER_H