LLVM  4.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 namespace msf {
23 class MSFBuilder;
24 class StreamWriter;
25 }
26 namespace pdb {
27 class PDBFile;
28 
30 public:
32  InfoStreamBuilder(const InfoStreamBuilder &) = delete;
34 
35  void setVersion(PdbRaw_ImplVer V);
36  void setSignature(uint32_t S);
37  void setAge(uint32_t A);
38  void setGuid(PDB_UniqueId G);
39 
41 
43 
45 
46  Error commit(const msf::MSFLayout &Layout,
47  const msf::WritableStream &Buffer) const;
48 
49 private:
50  msf::MSFBuilder &Msf;
51 
52  PdbRaw_ImplVer Ver;
53  uint32_t Sig;
54  uint32_t Age;
55  PDB_UniqueId Guid;
56 
57  NameMapBuilder NamedStreams;
58 };
59 }
60 }
61 
62 #endif
NameMapBuilder & getNamedStreamsBuilder()
void setVersion(PdbRaw_ImplVer V)
Defines a 128-bit unique identifier.
Definition: RawTypes.h:265
InfoStreamBuilder & operator=(const InfoStreamBuilder &)=delete
const DataFlowGraph & G
Definition: RDFGraph.cpp:206
InfoStreamBuilder(msf::MSFBuilder &Msf)
uint32_t calculateSerializedLength() const
Error commit(const msf::MSFLayout &Layout, const msf::WritableStream &Buffer) const
Lightweight error class with error context and mandatory checking.
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")