Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 1 | //===- IPDBInjectedSource.h - base class for PDB injected file --*- 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_IPDBINJECTEDSOURCE_H |
| 11 | #define LLVM_DEBUGINFO_PDB_IPDBINJECTEDSOURCE_H |
| 12 | |
| 13 | #include "PDBTypes.h" |
| 14 | #include "llvm/Support/raw_ostream.h" |
| 15 | #include <memory> |
| 16 | #include <string> |
| 17 | |
| 18 | namespace llvm { |
| 19 | class raw_ostream; |
| 20 | |
| 21 | namespace pdb { |
| 22 | |
| 23 | /// IPDBInjectedSource defines an interface used to represent source files |
| 24 | /// which were injected directly into the PDB file during the compilation |
| 25 | /// process. This is used, for example, to add natvis files to a PDB, but |
| 26 | /// in theory could be used to add arbitrary source code. |
| 27 | class IPDBInjectedSource { |
| 28 | public: |
| 29 | virtual ~IPDBInjectedSource(); |
| 30 | |
| 31 | virtual uint32_t getCrc32() const = 0; |
| 32 | virtual uint64_t getCodeByteSize() const = 0; |
| 33 | virtual std::string getFileName() const = 0; |
| 34 | virtual std::string getObjectFileName() const = 0; |
| 35 | virtual std::string getVirtualFileName() const = 0; |
| 36 | virtual PDB_SourceCompression getCompression() const = 0; |
| 37 | virtual std::string getCode() const = 0; |
| 38 | }; |
| 39 | } // namespace pdb |
| 40 | } // namespace llvm |
| 41 | |
| 42 | #endif // LLVM_DEBUGINFO_PDB_IPDBINJECTEDSOURCE_H |