[InstCombine] Signed saturation patterns
[llvm-core.git] / include / llvm / DebugInfo / PDB / IPDBInjectedSource.h
blobd5b36f9846b52acbc19cbfcdb9e5a9254969c98e
1 //===- IPDBInjectedSource.h - base class for PDB injected file --*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBINJECTEDSOURCE_H
10 #define LLVM_DEBUGINFO_PDB_IPDBINJECTEDSOURCE_H
12 #include "llvm/Support/raw_ostream.h"
13 #include <memory>
14 #include <string>
16 namespace llvm {
17 class raw_ostream;
19 namespace pdb {
21 /// IPDBInjectedSource defines an interface used to represent source files
22 /// which were injected directly into the PDB file during the compilation
23 /// process. This is used, for example, to add natvis files to a PDB, but
24 /// in theory could be used to add arbitrary source code.
25 class IPDBInjectedSource {
26 public:
27 virtual ~IPDBInjectedSource();
29 virtual uint32_t getCrc32() const = 0;
30 virtual uint64_t getCodeByteSize() const = 0;
31 virtual std::string getFileName() const = 0;
32 virtual std::string getObjectFileName() const = 0;
33 virtual std::string getVirtualFileName() const = 0;
34 // The returned value depends on the PDB producer,
35 // but 0 is guaranteed to mean "no compression".
36 // The enum PDB_SourceCompression lists known return values.
37 virtual uint32_t getCompression() const = 0;
38 virtual std::string getCode() const = 0;
40 } // namespace pdb
41 } // namespace llvm
43 #endif // LLVM_DEBUGINFO_PDB_IPDBINJECTEDSOURCE_H