Zachary Turner | 9a818ad | 2015-02-22 22:03:38 +0000 | [diff] [blame] | 1 | //===- FunctionDumper.h --------------------------------------- *- 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_TOOLS_LLVMPDBDUMP_FUNCTIONDUMPER_H |
| 11 | #define LLVM_TOOLS_LLVMPDBDUMP_FUNCTIONDUMPER_H |
| 12 | |
| 13 | #include "llvm/DebugInfo/PDB/PDBSymDumper.h" |
| 14 | |
| 15 | namespace llvm { |
| 16 | |
Zachary Turner | 2d11c20 | 2015-02-27 09:15:59 +0000 | [diff] [blame] | 17 | class LinePrinter; |
| 18 | |
Zachary Turner | 9a818ad | 2015-02-22 22:03:38 +0000 | [diff] [blame] | 19 | class FunctionDumper : public PDBSymDumper { |
| 20 | public: |
Zachary Turner | 2d11c20 | 2015-02-27 09:15:59 +0000 | [diff] [blame] | 21 | FunctionDumper(LinePrinter &P); |
Zachary Turner | 9a818ad | 2015-02-22 22:03:38 +0000 | [diff] [blame] | 22 | |
| 23 | enum class PointerType { None, Pointer, Reference }; |
| 24 | |
Zachary Turner | d270d22 | 2015-02-26 23:49:23 +0000 | [diff] [blame] | 25 | void start(const PDBSymbolTypeFunctionSig &Symbol, const char *Name, |
| 26 | PointerType Pointer, raw_ostream &OS); |
Zachary Turner | 29c6910 | 2015-02-23 05:58:34 +0000 | [diff] [blame] | 27 | void start(const PDBSymbolFunc &Symbol, PointerType Pointer, raw_ostream &OS, |
| 28 | int Indent); |
Zachary Turner | 9a818ad | 2015-02-22 22:03:38 +0000 | [diff] [blame] | 29 | |
| 30 | void dump(const PDBSymbolTypeArray &Symbol, raw_ostream &OS, |
| 31 | int Indent) override; |
| 32 | void dump(const PDBSymbolTypeBuiltin &Symbol, raw_ostream &OS, |
| 33 | int Indent) override; |
| 34 | void dump(const PDBSymbolTypeEnum &Symbol, raw_ostream &OS, |
| 35 | int Indent) override; |
| 36 | void dump(const PDBSymbolTypeFunctionArg &Symbol, raw_ostream &OS, |
| 37 | int Indent) override; |
| 38 | void dump(const PDBSymbolTypePointer &Symbol, raw_ostream &OS, |
| 39 | int Indent) override; |
| 40 | void dump(const PDBSymbolTypeTypedef &Symbol, raw_ostream &OS, |
| 41 | int Indent) override; |
| 42 | void dump(const PDBSymbolTypeUDT &Symbol, raw_ostream &OS, |
| 43 | int Indent) override; |
Zachary Turner | 2d11c20 | 2015-02-27 09:15:59 +0000 | [diff] [blame] | 44 | |
| 45 | private: |
| 46 | LinePrinter &Printer; |
Zachary Turner | 9a818ad | 2015-02-22 22:03:38 +0000 | [diff] [blame] | 47 | }; |
| 48 | } |
| 49 | |
| 50 | #endif |