diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-10-20 19:48:26 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-10-20 19:48:26 +0000 |
commit | 75257bc2ec080af735932cb25eca9574307c195c (patch) | |
tree | f4060db0192e1c4927ecec1f3e52a3fff2b673b7 /llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | |
parent | 48db80cc6cb32202c74c9904c3dc0fc3362421e8 (diff) | |
download | bcm5719-llvm-75257bc2ec080af735932cb25eca9574307c195c.tar.gz bcm5719-llvm-75257bc2ec080af735932cb25eca9574307c195c.zip |
COFF: Add type server pdb files to linkrepro tar file.
Differential Revision: https://reviews.llvm.org/D38977
llvm-svn: 316233
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp index d7be2d576c2..7be4c762b02 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp @@ -68,15 +68,9 @@ NativeSession::NativeSession(std::unique_ptr<PDBFile> PdbFile, NativeSession::~NativeSession() = default; -Error NativeSession::createFromPdb(StringRef Path, +Error NativeSession::createFromPdb(std::unique_ptr<MemoryBuffer> Buffer, std::unique_ptr<IPDBSession> &Session) { - ErrorOr<std::unique_ptr<MemoryBuffer>> ErrorOrBuffer = - MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1, - /*RequiresNullTerminator=*/false); - if (!ErrorOrBuffer) - return make_error<GenericError>(generic_error_code::invalid_path); - - std::unique_ptr<MemoryBuffer> Buffer = std::move(*ErrorOrBuffer); + StringRef Path = Buffer->getBufferIdentifier(); auto Stream = llvm::make_unique<MemoryBufferByteStream>( std::move(Buffer), llvm::support::little); |