LLVM  5.0.0
InfoStreamBuilder.h
Go to the documentation of this file.
1 //===- InfoStreamBuilder.h - PDB Info Stream Creation -----------*- 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_RAW_PDBINFOSTREAMBUILDER_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAMBUILDER_H
12 
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/Support/Error.h"
15 
20 
21 namespace llvm {
22 class WritableBinaryStreamRef;
23 
24 namespace msf {
25 class MSFBuilder;
26 }
27 namespace pdb {
28 class PDBFile;
29 class NamedStreamMap;
30 
32 public:
34  InfoStreamBuilder(const InfoStreamBuilder &) = delete;
36 
37  void setVersion(PdbRaw_ImplVer V);
38  void setSignature(uint32_t S);
39  void setAge(uint32_t A);
40  void setGuid(codeview::GUID G);
41  void addFeature(PdbRaw_FeatureSig Sig);
42 
44 
46 
47  Error commit(const msf::MSFLayout &Layout,
48  WritableBinaryStreamRef Buffer) const;
49 
50 private:
51  msf::MSFBuilder &Msf;
52 
53  std::vector<PdbRaw_FeatureSig> Features;
54  PdbRaw_ImplVer Ver;
55  uint32_t Sig;
56  uint32_t Age;
57  codeview::GUID Guid;
58 
59  NamedStreamMap &NamedStreams;
60 };
61 }
62 }
63 
64 #endif
Error commit(const msf::MSFLayout &Layout, WritableBinaryStreamRef Buffer) const
void setGuid(codeview::GUID G)
InfoStreamBuilder(msf::MSFBuilder &Msf, NamedStreamMap &NamedStreams)
This represents the 'GUID' type from windows.h.
Definition: GUID.h:22
void setVersion(PdbRaw_ImplVer V)
#define A
Definition: LargeTest.cpp:12
InfoStreamBuilder & operator=(const InfoStreamBuilder &)=delete
const DataFlowGraph & G
Definition: RDFGraph.cpp:206
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156
void addFeature(PdbRaw_FeatureSig Sig)