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