diff options
| author | Zachary Turner <zturner@google.com> | 2016-05-25 03:43:17 +0000 | 
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-05-25 03:43:17 +0000 | 
| commit | 85ed80b9e69787452b4c78e37f38e2080b5b87fc (patch) | |
| tree | 44b413e079629f59bb640c5dfa2a96f47c9eb689 /llvm/lib | |
| parent | 2487f19258f721915709b902ac178f74bf560574 (diff) | |
| download | bcm5719-llvm-85ed80b9e69787452b4c78e37f38e2080b5b87fc.tar.gz bcm5719-llvm-85ed80b9e69787452b4c78e37f38e2080b5b87fc.zip | |
[llvm-pdbdump] Dump stream summary list.
Try to figure out what each stream is, and dump its name.
This gives us a better picture of what streams we still don't
understand.
llvm-svn: 270653
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp | 8 | 
3 files changed, 18 insertions, 0 deletions
| diff --git a/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp index be90285a41e..ccc4a5e6c9b 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp @@ -53,6 +53,11 @@ uint32_t InfoStream::getNamedStreamIndex(llvm::StringRef Name) const {    return Result;  } +iterator_range<StringMapConstIterator<uint32_t>> +InfoStream::named_streams() const { +  return NamedStreams.entries(); +} +  PdbRaw_ImplVer InfoStream::getVersion() const {    return static_cast<PdbRaw_ImplVer>(Version);  } diff --git a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp index b3bd94cda90..202e7173b0e 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp @@ -127,6 +127,11 @@ Error NameMap::load(StreamReader &Stream) {    return Error::success();  } +iterator_range<StringMapConstIterator<uint32_t>> NameMap::entries() const { +  return llvm::make_range<StringMapConstIterator<uint32_t>>(Mapping.begin(), +                                                            Mapping.end()); +} +  bool NameMap::tryGetValue(StringRef Name, uint32_t &Value) const {    auto Iter = Mapping.find(Name);    if (Iter == Mapping.end()) diff --git a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp index db2ea20ce14..ed988bbf2e9 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp @@ -129,6 +129,14 @@ uint32_t TpiStream::NumTypeRecords() const {    return TypeIndexEnd() - TypeIndexBegin();  } +uint16_t TpiStream::getTypeHashStreamIndex() const { +  return Header->HashStreamIndex; +} + +uint16_t TpiStream::getTypeHashStreamAuxIndex() const { +  return Header->HashAuxStreamIndex; +} +  iterator_range<codeview::TypeIterator> TpiStream::types(bool *HadError) const {    return codeview::makeTypeRange(RecordsBuffer.data(), /*HadError=*/HadError);  } | 

