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/llvm-pdbutil.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/llvm-pdbutil.cpp')
| -rw-r--r-- | llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp index 43a4259cf38..a19257af38d 100644 --- a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp +++ b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp @@ -1384,8 +1384,7 @@ static void exportStream() { << "' (index " << Index << ") to file " << OutFileName << ".\n"; } - SourceStream = MappedBlockStream::createIndexedStream( - File.getMsfLayout(), File.getMsfBuffer(), Index, File.getAllocator()); + SourceStream = File.createIndexedStream(Index); auto OutFile = ExitOnErr( FileOutputBuffer::create(OutFileName, SourceStream->getLength())); FileBufferByteStream DestStream(std::move(OutFile), llvm::support::little); |

