LLVM  8.0.1
DbiStreamBuilder.cpp
Go to the documentation of this file.
1 //===- DbiStreamBuilder.cpp - PDB Dbi 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 
11 
12 #include "llvm/ADT/ArrayRef.h"
13 #include "llvm/BinaryFormat/COFF.h"
20 #include "llvm/Object/COFF.h"
22 
23 using namespace llvm;
24 using namespace llvm::codeview;
25 using namespace llvm::msf;
26 using namespace llvm::pdb;
27 
28 DbiStreamBuilder::DbiStreamBuilder(msf::MSFBuilder &Msf)
29  : Msf(Msf), Allocator(Msf.getAllocator()), Age(1), BuildNumber(0),
30  PdbDllVersion(0), PdbDllRbld(0), Flags(0), MachineType(PDB_Machine::x86),
31  Header(nullptr) {}
32 
34 
36 
37 void DbiStreamBuilder::setAge(uint32_t A) { Age = A; }
38 
39 void DbiStreamBuilder::setBuildNumber(uint16_t B) { BuildNumber = B; }
40 
41 void DbiStreamBuilder::setBuildNumber(uint8_t Major, uint8_t Minor) {
42  BuildNumber = (uint16_t(Major) << DbiBuildNo::BuildMajorShift) &
44  BuildNumber |= (uint16_t(Minor) << DbiBuildNo::BuildMinorShift) &
46  BuildNumber |= DbiBuildNo::NewVersionFormatMask;
47 }
48 
49 void DbiStreamBuilder::setPdbDllVersion(uint16_t V) { PdbDllVersion = V; }
50 
51 void DbiStreamBuilder::setPdbDllRbld(uint16_t R) { PdbDllRbld = R; }
52 
53 void DbiStreamBuilder::setFlags(uint16_t F) { Flags = F; }
54 
55 void DbiStreamBuilder::setMachineType(PDB_Machine M) { MachineType = M; }
56 
58  // These enums are mirrors of each other, so we can just cast the value.
59  MachineType = static_cast<pdb::PDB_Machine>(static_cast<unsigned>(M));
60 }
61 
63  SectionMap = SecMap;
64 }
65 
67  GlobalsStreamIndex = Index;
68 }
69 
71  SymRecordStreamIndex = Index;
72 }
73 
75  PublicsStreamIndex = Index;
76 }
77 
79  if (!NewFpoData.hasValue())
80  NewFpoData.emplace(false);
81 
82  NewFpoData->addFrameData(FD);
83 }
84 
86  OldFpoData.push_back(FD);
87 }
88 
91  assert(Type != DbgHeaderType::NewFPO &&
92  "NewFPO data should be written via addFrameData()!");
93 
94  DbgStreams[(int)Type].emplace();
95  DbgStreams[(int)Type]->Size = Data.size();
96  DbgStreams[(int)Type]->WriteFn = [Data](BinaryStreamWriter &Writer) {
97  return Writer.writeArray(Data);
98  };
99  return Error::success();
100 }
101 
103  return ECNamesBuilder.insert(Name);
104 }
105 
107  // For now we only support serializing the header.
108  return sizeof(DbiStreamHeader) + calculateFileInfoSubstreamSize() +
109  calculateModiSubstreamSize() + calculateSectionContribsStreamSize() +
110  calculateSectionMapStreamSize() + calculateDbgStreamsSize() +
111  ECNamesBuilder.calculateSerializedSize();
112 }
113 
116  uint32_t Index = ModiList.size();
117  ModiList.push_back(
118  llvm::make_unique<DbiModuleDescriptorBuilder>(ModuleName, Index, Msf));
119  return *ModiList.back();
120 }
121 
123  StringRef File) {
124  uint32_t Index = SourceFileNames.size();
125  SourceFileNames.insert(std::make_pair(File, Index));
126  Module.addSourceFile(File);
127  return Error::success();
128 }
129 
131  auto NameIter = SourceFileNames.find(File);
132  if (NameIter == SourceFileNames.end())
133  return make_error<RawError>(raw_error_code::no_entry,
134  "The specified source file was not found");
135  return NameIter->getValue();
136 }
137 
138 uint32_t DbiStreamBuilder::calculateModiSubstreamSize() const {
139  uint32_t Size = 0;
140  for (const auto &M : ModiList)
141  Size += M->calculateSerializedLength();
142  return Size;
143 }
144 
145 uint32_t DbiStreamBuilder::calculateSectionContribsStreamSize() const {
146  if (SectionContribs.empty())
147  return 0;
148  return sizeof(enum PdbRaw_DbiSecContribVer) +
149  sizeof(SectionContribs[0]) * SectionContribs.size();
150 }
151 
152 uint32_t DbiStreamBuilder::calculateSectionMapStreamSize() const {
153  if (SectionMap.empty())
154  return 0;
155  return sizeof(SecMapHeader) + sizeof(SecMapEntry) * SectionMap.size();
156 }
157 
158 uint32_t DbiStreamBuilder::calculateNamesOffset() const {
159  uint32_t Offset = 0;
160  Offset += sizeof(ulittle16_t); // NumModules
161  Offset += sizeof(ulittle16_t); // NumSourceFiles
162  Offset += ModiList.size() * sizeof(ulittle16_t); // ModIndices
163  Offset += ModiList.size() * sizeof(ulittle16_t); // ModFileCounts
164  uint32_t NumFileInfos = 0;
165  for (const auto &M : ModiList)
166  NumFileInfos += M->source_files().size();
167  Offset += NumFileInfos * sizeof(ulittle32_t); // FileNameOffsets
168  return Offset;
169 }
170 
171 uint32_t DbiStreamBuilder::calculateFileInfoSubstreamSize() const {
172  uint32_t Size = calculateNamesOffset();
173  Size += calculateNamesBufferSize();
174  return alignTo(Size, sizeof(uint32_t));
175 }
176 
177 uint32_t DbiStreamBuilder::calculateNamesBufferSize() const {
178  uint32_t Size = 0;
179  for (const auto &F : SourceFileNames) {
180  Size += F.getKeyLength() + 1; // Names[I];
181  }
182  return Size;
183 }
184 
185 uint32_t DbiStreamBuilder::calculateDbgStreamsSize() const {
186  return DbgStreams.size() * sizeof(uint16_t);
187 }
188 
189 Error DbiStreamBuilder::generateFileInfoSubstream() {
190  uint32_t Size = calculateFileInfoSubstreamSize();
191  auto Data = Allocator.Allocate<uint8_t>(Size);
192  uint32_t NamesOffset = calculateNamesOffset();
193 
194  FileInfoBuffer = MutableBinaryByteStream(MutableArrayRef<uint8_t>(Data, Size),
196 
197  WritableBinaryStreamRef MetadataBuffer =
198  WritableBinaryStreamRef(FileInfoBuffer).keep_front(NamesOffset);
199  BinaryStreamWriter MetadataWriter(MetadataBuffer);
200 
201  uint16_t ModiCount = std::min<uint32_t>(UINT16_MAX, ModiList.size());
202  uint16_t FileCount = std::min<uint32_t>(UINT16_MAX, SourceFileNames.size());
203  if (auto EC = MetadataWriter.writeInteger(ModiCount)) // NumModules
204  return EC;
205  if (auto EC = MetadataWriter.writeInteger(FileCount)) // NumSourceFiles
206  return EC;
207  for (uint16_t I = 0; I < ModiCount; ++I) {
208  if (auto EC = MetadataWriter.writeInteger(I)) // Mod Indices
209  return EC;
210  }
211  for (const auto &MI : ModiList) {
212  FileCount = static_cast<uint16_t>(MI->source_files().size());
213  if (auto EC = MetadataWriter.writeInteger(FileCount)) // Mod File Counts
214  return EC;
215  }
216 
217  // Before writing the FileNameOffsets array, write the NamesBuffer array.
218  // A side effect of this is that this will actually compute the various
219  // file name offsets, so we can then go back and write the FileNameOffsets
220  // array to the other substream.
221  NamesBuffer = WritableBinaryStreamRef(FileInfoBuffer).drop_front(NamesOffset);
222  BinaryStreamWriter NameBufferWriter(NamesBuffer);
223  for (auto &Name : SourceFileNames) {
224  Name.second = NameBufferWriter.getOffset();
225  if (auto EC = NameBufferWriter.writeCString(Name.getKey()))
226  return EC;
227  }
228 
229  for (const auto &MI : ModiList) {
230  for (StringRef Name : MI->source_files()) {
231  auto Result = SourceFileNames.find(Name);
232  if (Result == SourceFileNames.end())
233  return make_error<RawError>(raw_error_code::no_entry,
234  "The source file was not found.");
235  if (auto EC = MetadataWriter.writeInteger(Result->second))
236  return EC;
237  }
238  }
239 
240  if (auto EC = NameBufferWriter.padToAlignment(sizeof(uint32_t)))
241  return EC;
242 
243  if (NameBufferWriter.bytesRemaining() > 0)
244  return make_error<RawError>(raw_error_code::invalid_format,
245  "The names buffer contained unexpected data.");
246 
247  if (MetadataWriter.bytesRemaining() > sizeof(uint32_t))
248  return make_error<RawError>(
250  "The metadata buffer contained unexpected data.");
251 
252  return Error::success();
253 }
254 
255 Error DbiStreamBuilder::finalize() {
256  if (Header)
257  return Error::success();
258 
259  for (auto &MI : ModiList)
260  MI->finalize();
261 
262  if (auto EC = generateFileInfoSubstream())
263  return EC;
264 
265  DbiStreamHeader *H = Allocator.Allocate<DbiStreamHeader>();
266  ::memset(H, 0, sizeof(DbiStreamHeader));
267  H->VersionHeader = *VerHeader;
268  H->VersionSignature = -1;
269  H->Age = Age;
270  H->BuildNumber = BuildNumber;
271  H->Flags = Flags;
272  H->PdbDllRbld = PdbDllRbld;
273  H->PdbDllVersion = PdbDllVersion;
274  H->MachineType = static_cast<uint16_t>(MachineType);
275 
276  H->ECSubstreamSize = ECNamesBuilder.calculateSerializedSize();
277  H->FileInfoSize = FileInfoBuffer.getLength();
278  H->ModiSubstreamSize = calculateModiSubstreamSize();
279  H->OptionalDbgHdrSize = DbgStreams.size() * sizeof(uint16_t);
280  H->SecContrSubstreamSize = calculateSectionContribsStreamSize();
281  H->SectionMapSize = calculateSectionMapStreamSize();
282  H->TypeServerSize = 0;
283  H->SymRecordStreamIndex = SymRecordStreamIndex;
284  H->PublicSymbolStreamIndex = PublicsStreamIndex;
285  H->MFCTypeServerIndex = 0; // Not sure what this is, but link.exe writes 0.
286  H->GlobalSymbolStreamIndex = GlobalsStreamIndex;
287 
288  Header = H;
289  return Error::success();
290 }
291 
293  if (NewFpoData.hasValue()) {
294  DbgStreams[(int)DbgHeaderType::NewFPO].emplace();
295  DbgStreams[(int)DbgHeaderType::NewFPO]->Size =
296  NewFpoData->calculateSerializedSize();
297  DbgStreams[(int)DbgHeaderType::NewFPO]->WriteFn =
298  [this](BinaryStreamWriter &Writer) {
299  return NewFpoData->commit(Writer);
300  };
301  }
302 
303  if (!OldFpoData.empty()) {
304  DbgStreams[(int)DbgHeaderType::FPO].emplace();
305  DbgStreams[(int)DbgHeaderType::FPO]->Size =
306  sizeof(object::FpoData) * OldFpoData.size();
307  DbgStreams[(int)DbgHeaderType::FPO]->WriteFn =
308  [this](BinaryStreamWriter &Writer) {
309  return Writer.writeArray(makeArrayRef(OldFpoData));
310  };
311  }
312 
313  for (auto &S : DbgStreams) {
314  if (!S.hasValue())
315  continue;
316  auto ExpectedIndex = Msf.addStream(S->Size);
317  if (!ExpectedIndex)
318  return ExpectedIndex.takeError();
319  S->StreamNumber = *ExpectedIndex;
320  }
321 
322  for (auto &MI : ModiList) {
323  if (auto EC = MI->finalizeMsfLayout())
324  return EC;
325  }
326 
328  if (auto EC = Msf.setStreamSize(StreamDBI, Length))
329  return EC;
330  return Error::success();
331 }
332 
333 static uint16_t toSecMapFlags(uint32_t Flags) {
334  uint16_t Ret = 0;
335  if (Flags & COFF::IMAGE_SCN_MEM_READ)
336  Ret |= static_cast<uint16_t>(OMFSegDescFlags::Read);
337  if (Flags & COFF::IMAGE_SCN_MEM_WRITE)
338  Ret |= static_cast<uint16_t>(OMFSegDescFlags::Write);
339  if (Flags & COFF::IMAGE_SCN_MEM_EXECUTE)
340  Ret |= static_cast<uint16_t>(OMFSegDescFlags::Execute);
341  if (Flags & COFF::IMAGE_SCN_MEM_EXECUTE)
342  Ret |= static_cast<uint16_t>(OMFSegDescFlags::Execute);
343  if (!(Flags & COFF::IMAGE_SCN_MEM_16BIT))
344  Ret |= static_cast<uint16_t>(OMFSegDescFlags::AddressIs32Bit);
345 
346  // This seems always 1.
347  Ret |= static_cast<uint16_t>(OMFSegDescFlags::IsSelector);
348 
349  return Ret;
350 }
351 
352 // A utility function to create a Section Map for a given list of COFF sections.
353 //
354 // A Section Map seem to be a copy of a COFF section list in other format.
355 // I don't know why a PDB file contains both a COFF section header and
356 // a Section Map, but it seems it must be present in a PDB.
357 std::vector<SecMapEntry> DbiStreamBuilder::createSectionMap(
359  std::vector<SecMapEntry> Ret;
360  int Idx = 0;
361 
362  auto Add = [&]() -> SecMapEntry & {
363  Ret.emplace_back();
364  auto &Entry = Ret.back();
365  memset(&Entry, 0, sizeof(Entry));
366 
367  Entry.Frame = Idx + 1;
368 
369  // We don't know the meaning of these fields yet.
370  Entry.SecName = UINT16_MAX;
371  Entry.ClassName = UINT16_MAX;
372 
373  return Entry;
374  };
375 
376  for (auto &Hdr : SecHdrs) {
377  auto &Entry = Add();
378  Entry.Flags = toSecMapFlags(Hdr.Characteristics);
379  Entry.SecByteLength = Hdr.VirtualSize;
380  ++Idx;
381  }
382 
383  // The last entry is for absolute symbols.
384  auto &Entry = Add();
385  Entry.Flags = static_cast<uint16_t>(OMFSegDescFlags::AddressIs32Bit) |
386  static_cast<uint16_t>(OMFSegDescFlags::IsAbsoluteAddress);
387  Entry.SecByteLength = UINT32_MAX;
388 
389  return Ret;
390 }
391 
393  WritableBinaryStreamRef MsfBuffer) {
394  if (auto EC = finalize())
395  return EC;
396 
397  auto DbiS = WritableMappedBlockStream::createIndexedStream(
398  Layout, MsfBuffer, StreamDBI, Allocator);
399 
400  BinaryStreamWriter Writer(*DbiS);
401  if (auto EC = Writer.writeObject(*Header))
402  return EC;
403 
404  for (auto &M : ModiList) {
405  if (auto EC = M->commit(Writer, Layout, MsfBuffer))
406  return EC;
407  }
408 
409  if (!SectionContribs.empty()) {
410  if (auto EC = Writer.writeEnum(DbiSecContribVer60))
411  return EC;
412  if (auto EC = Writer.writeArray(makeArrayRef(SectionContribs)))
413  return EC;
414  }
415 
416  if (!SectionMap.empty()) {
417  ulittle16_t Size = static_cast<ulittle16_t>(SectionMap.size());
418  SecMapHeader SMHeader = {Size, Size};
419  if (auto EC = Writer.writeObject(SMHeader))
420  return EC;
421  if (auto EC = Writer.writeArray(SectionMap))
422  return EC;
423  }
424 
425  if (auto EC = Writer.writeStreamRef(FileInfoBuffer))
426  return EC;
427 
428  if (auto EC = ECNamesBuilder.commit(Writer))
429  return EC;
430 
431  for (auto &Stream : DbgStreams) {
432  uint16_t StreamNumber = kInvalidStreamIndex;
433  if (Stream.hasValue())
434  StreamNumber = Stream->StreamNumber;
435  if (auto EC = Writer.writeInteger(StreamNumber))
436  return EC;
437  }
438 
439  for (auto &Stream : DbgStreams) {
440  if (!Stream.hasValue())
441  continue;
442  assert(Stream->StreamNumber != kInvalidStreamIndex);
443 
444  auto WritableStream = WritableMappedBlockStream::createIndexedStream(
445  Layout, MsfBuffer, Stream->StreamNumber, Allocator);
446  BinaryStreamWriter DbgStreamWriter(*WritableStream);
447 
448  if (auto EC = Stream->WriteFn(DbgStreamWriter))
449  return EC;
450  }
451 
452  if (Writer.bytesRemaining() > 0)
453  return make_error<RawError>(raw_error_code::invalid_format,
454  "Unexpected bytes found in DBI Stream");
455  return Error::success();
456 }
support::little32_t FileInfoSize
Size of file info substream.
Definition: RawTypes.h:155
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
uint32_t addECName(StringRef Name)
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer...
This class represents lattice values for constants.
Definition: AllocatorList.h:24
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
support::little32_t VersionSignature
Definition: RawTypes.h:121
Data in the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:552
void setSectionMap(ArrayRef< SecMapEntry > SecMap)
static const uint16_t BuildMinorMask
uint16_t MinorVersion : 8; uint16_t MajorVersion : 7; uint16_t NewVersionFormat : 1; ...
Definition: RawTypes.h:110
void setMachineType(PDB_Machine M)
support::ulittle16_t GlobalSymbolStreamIndex
Global symbol stream #.
Definition: RawTypes.h:128
static std::vector< SecMapEntry > createSectionMap(ArrayRef< llvm::object::coff_section > SecHdrs)
support::ulittle32_t MFCTypeServerIndex
Index of MFC Type Server.
Definition: RawTypes.h:161
iterator find(StringRef Key)
Definition: StringMap.h:333
F(f)
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
Definition: MathExtras.h:685
detail::packed_endian_specific_integral< uint16_t, little, unaligned > ulittle16_t
Definition: Endian.h:269
void setGlobalsStreamIndex(uint32_t Index)
support::ulittle16_t BuildNumber
See DbiBuildNo structure.
Definition: RawTypes.h:131
Error commit(BinaryStreamWriter &Writer) const
MachineTypes
Definition: COFF.h:94
amdgpu Simplify well known AMD library false Value Value const Twine & Name
unsigned size() const
Definition: StringMap.h:112
support::little32_t TypeServerSize
Size of type server map.
Definition: RawTypes.h:158
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:451
support::little32_t SectionMapSize
Size of sec. map substream.
Definition: RawTypes.h:152
static const uint16_t NewVersionFormatMask
Definition: RawTypes.h:116
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
The fixed size header that appears at the beginning of the DBI Stream.
Definition: RawTypes.h:120
void setSymbolRecordStreamIndex(uint32_t Index)
support::little32_t ECSubstreamSize
Size of EC stream (what is EC?)
Definition: RawTypes.h:167
Error addDbgStream(pdb::DbgHeaderType Type, ArrayRef< uint8_t > Data)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
Error writeArray(ArrayRef< T > Array)
Writes an array of objects of type T to the underlying stream, as if by using memcpy.
const uint16_t kInvalidStreamIndex
Definition: RawConstants.h:20
support::ulittle16_t PdbDllRbld
rbld number of mspdbNNN.dll
Definition: RawTypes.h:143
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
static const uint16_t BuildMajorShift
Definition: RawTypes.h:114
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
Definition: Endian.h:271
size_t size() const
size - Get the array size.
Definition: ArrayRef.h:149
Expected< uint32_t > getSourceFileNameIndex(StringRef FileName)
LLVM_ATTRIBUTE_RETURNS_NONNULL LLVM_ATTRIBUTE_RETURNS_NOALIAS void * Allocate(size_t Size, size_t Alignment)
Allocate space at the specified alignment.
Definition: Allocator.h:215
#define H(x, y, z)
Definition: MD5.cpp:57
Error writeStreamRef(BinaryStreamRef Ref)
Efficiently reads all data from Ref, and writes it to this stream.
uint32_t calculateSerializedLength() const
RefType drop_front(uint32_t N) const
Return a new BinaryStreamRef with the first N elements removed.
Provides write only access to a subclass of WritableBinaryStream.
void setVersionHeader(PdbRaw_DbiVer V)
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.
Error commit(const msf::MSFLayout &Layout, WritableBinaryStreamRef MsfBuffer)
support::ulittle16_t PdbDllVersion
version of mspdbNNN.dll
Definition: RawTypes.h:137
Error setStreamSize(uint32_t Idx, uint32_t Size)
Update the size of an existing stream.
Definition: MSFBuilder.cpp:192
uint32_t bytesRemaining() const
Error writeCString(StringRef Str)
Write the string Str to the underlying stream followed by a null terminator.
support::little32_t OptionalDbgHdrSize
Size of DbgHeader info.
Definition: RawTypes.h:164
support::ulittle16_t Flags
See DbiFlags enum.
Definition: RawTypes.h:170
Basic Register Allocator
static ErrorSuccess success()
Create a success value.
Definition: Error.h:327
void addNewFpoData(const codeview::FrameData &FD)
Expected< uint32_t > addStream(uint32_t Size, ArrayRef< uint32_t > Blocks)
Add a stream to the MSF file with the given size, occupying the given list of blocks.
Definition: MSFBuilder.cpp:155
PdbRaw_DbiSecContribVer
Definition: RawConstants.h:68
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
Definition: StringMap.h:366
Expected< DbiModuleDescriptorBuilder & > addModuleInfo(StringRef ModuleName)
support::little32_t ModiSubstreamSize
Size of module info stream.
Definition: RawTypes.h:146
void addOldFpoData(const object::FpoData &Fpo)
Error writeEnum(T Num)
Similar to writeInteger.
void setPublicsStreamIndex(uint32_t Index)
static uint16_t toSecMapFlags(uint32_t Flags)
support::little32_t SecContrSubstreamSize
Size of sec. contrib stream.
Definition: RawTypes.h:149
static const uint16_t BuildMajorMask
Definition: RawTypes.h:113
#define I(x, y, z)
Definition: MD5.cpp:58
support::ulittle32_t Age
How "old" is this DBI Stream. Should match the age of the PDB InfoStream.
Definition: RawTypes.h:125
Error padToAlignment(uint32_t Align)
support::ulittle16_t SymRecordStreamIndex
Symbol records stream #.
Definition: RawTypes.h:140
support::ulittle32_t VersionHeader
Definition: RawTypes.h:122
uint32_t Size
Definition: Profile.cpp:47
static const uint16_t BuildMinorShift
Definition: RawTypes.h:111
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
RefType keep_front(uint32_t N) const
Return a new BinaryStreamRef with only the first N elements remaining.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
IRTranslator LLVM IR MI
support::ulittle16_t PublicSymbolStreamIndex
Public symbols stream #.
Definition: RawTypes.h:134
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
support::ulittle16_t MachineType
See PDB_MachineType enum.
Definition: RawTypes.h:173
Error addModuleSourceFile(DbiModuleDescriptorBuilder &Module, StringRef File)
uint32_t getLength() override
Return the number of bytes of data in this stream.
iterator end()
Definition: StringMap.h:318