1 //===- PDBStringTableBuilder.h - PDB String Table Builder -------*- 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 // This file creates the "/names" stream.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLEBUILDER_H
15 #define LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLEBUILDER_H
17 #include "llvm/ADT/DenseMap.h"
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/DebugInfo/CodeView/DebugStringTableSubsection.h"
20 #include "llvm/Support/Error.h"
24 class BinaryStreamWriter;
25 class WritableBinaryStreamRef;
35 class PDBStringTableBuilder {
37 // If string S does not exist in the string table, insert it.
38 // Returns the ID for S.
39 uint32_t insert(StringRef S);
41 uint32_t calculateSerializedSize() const;
42 Error commit(BinaryStreamWriter &Writer) const;
44 void setStrings(const codeview::DebugStringTableSubsection &Strings);
47 uint32_t calculateHashTableSize() const;
48 Error writeHeader(BinaryStreamWriter &Writer) const;
49 Error writeStrings(BinaryStreamWriter &Writer) const;
50 Error writeHashTable(BinaryStreamWriter &Writer) const;
51 Error writeEpilogue(BinaryStreamWriter &Writer) const;
53 codeview::DebugStringTableSubsection Strings;
56 } // end namespace pdb
57 } // end namespace llvm
59 #endif // LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLEBUILDER_H