1 //===- DbiStreamBuilder.h - PDB Dbi Stream Creation -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAMBUILDER_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAMBUILDER_H
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/Support/Error.h"
16 #include "llvm/DebugInfo/PDB/PDBTypes.h"
17 #include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
18 #include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
25 class DbiStreamBuilder {
29 DbiStreamBuilder(const DbiStreamBuilder &) = delete;
30 DbiStreamBuilder &operator=(const DbiStreamBuilder &) = delete;
32 void setVersionHeader(PdbRaw_DbiVer V);
33 void setAge(uint32_t A);
34 void setBuildNumber(uint16_t B);
35 void setPdbDllVersion(uint16_t V);
36 void setPdbDllRbld(uint16_t R);
37 void setFlags(uint16_t F);
38 void setMachineType(PDB_Machine M);
40 uint32_t calculateSerializedLength() const;
42 Expected<std::unique_ptr<DbiStream>> build(PDBFile &File);
45 Optional<PdbRaw_DbiVer> VerHeader;
48 uint16_t PdbDllVersion;
51 PDB_Machine MachineType;