xref: /netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-pdbutil/PrettyFunctionDumper.h (revision 7330f729ccf0bd976a06f95fad452fe774fc7fd1)
1*7330f729Sjoerg //===- PrettyFunctionDumper.h --------------------------------- *- C++ --*-===//
2*7330f729Sjoerg //
3*7330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*7330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information.
5*7330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*7330f729Sjoerg //
7*7330f729Sjoerg //===----------------------------------------------------------------------===//
8*7330f729Sjoerg 
9*7330f729Sjoerg #ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYFUNCTIONDUMPER_H
10*7330f729Sjoerg #define LLVM_TOOLS_LLVMPDBDUMP_PRETTYFUNCTIONDUMPER_H
11*7330f729Sjoerg 
12*7330f729Sjoerg #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
13*7330f729Sjoerg 
14*7330f729Sjoerg namespace llvm {
15*7330f729Sjoerg namespace pdb {
16*7330f729Sjoerg class LinePrinter;
17*7330f729Sjoerg 
18*7330f729Sjoerg class FunctionDumper : public PDBSymDumper {
19*7330f729Sjoerg public:
20*7330f729Sjoerg   FunctionDumper(LinePrinter &P);
21*7330f729Sjoerg 
22*7330f729Sjoerg   enum class PointerType { None, Pointer, Reference };
23*7330f729Sjoerg 
24*7330f729Sjoerg   void start(const PDBSymbolTypeFunctionSig &Symbol, const char *Name,
25*7330f729Sjoerg              PointerType Pointer);
26*7330f729Sjoerg   void start(const PDBSymbolFunc &Symbol, PointerType Pointer);
27*7330f729Sjoerg 
28*7330f729Sjoerg   void dump(const PDBSymbolTypeArray &Symbol) override;
29*7330f729Sjoerg   void dump(const PDBSymbolTypeBuiltin &Symbol) override;
30*7330f729Sjoerg   void dump(const PDBSymbolTypeEnum &Symbol) override;
31*7330f729Sjoerg   void dump(const PDBSymbolTypeFunctionArg &Symbol) override;
32*7330f729Sjoerg   void dump(const PDBSymbolTypePointer &Symbol) override;
33*7330f729Sjoerg   void dump(const PDBSymbolTypeTypedef &Symbol) override;
34*7330f729Sjoerg   void dump(const PDBSymbolTypeUDT &Symbol) override;
35*7330f729Sjoerg 
36*7330f729Sjoerg private:
37*7330f729Sjoerg   LinePrinter &Printer;
38*7330f729Sjoerg };
39*7330f729Sjoerg }
40*7330f729Sjoerg }
41*7330f729Sjoerg 
42*7330f729Sjoerg #endif
43