diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2019-07-12 18:24:38 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2019-07-12 18:24:38 +0000 |
| commit | 13f7ddff17ba1f4c5a51c83af1c83cb501ad0653 (patch) | |
| tree | 5b231a7ac4ff8a37b26d87895ff29c6e47e5363a /llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp | |
| parent | db8e36481a2189422e60b00b709dbfb684074fc4 (diff) | |
| download | bcm5719-llvm-13f7ddff17ba1f4c5a51c83af1c83cb501ad0653.tar.gz bcm5719-llvm-13f7ddff17ba1f4c5a51c83af1c83cb501ad0653.zip | |
Slightly simplify MappedBlockStream::createIndexedStream() calls
All callers had a PDBFile object at hand, so call
Pdb.createIndexedStream() instead, which pre-populates all the arguments
(and returns nullptr for kInvalidStreamIndex).
Also change safelyCreateIndexedStream() to only take the string index,
and update callers. Make the method public and call it in two places
that manually did the bounds checking before.
No intended behavior change.
Differential Revision: https://reviews.llvm.org/D64633
llvm-svn: 365936
Diffstat (limited to 'llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp')
| -rw-r--r-- | llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp index f81381e1727..80b76657fac 100644 --- a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp +++ b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp @@ -231,10 +231,7 @@ Error YAMLOutputStyle::dumpDbiStream() { if (ModiStream == kInvalidStreamIndex) continue; - auto ModStreamData = msf::MappedBlockStream::createIndexedStream( - File.getMsfLayout(), File.getMsfBuffer(), ModiStream, - File.getAllocator()); - + auto ModStreamData = File.createIndexedStream(ModiStream); pdb::ModuleDebugStreamRef ModS(MI, std::move(ModStreamData)); if (auto EC = ModS.reload()) return EC; |

