mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
[llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDB
A PDB can be thought of as a very simple file system. It is occasionally illuminating to see the contents of the underlying files. Differential Revision: http://reviews.llvm.org/D13674 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250356 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -162,13 +162,14 @@ MemoryBuffer::getNewMemBuffer(size_t Size, StringRef BufferName) {
|
||||
}
|
||||
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer>>
|
||||
MemoryBuffer::getFileOrSTDIN(const Twine &Filename, int64_t FileSize) {
|
||||
MemoryBuffer::getFileOrSTDIN(const Twine &Filename, int64_t FileSize,
|
||||
bool RequiresNullTerminator) {
|
||||
SmallString<256> NameBuf;
|
||||
StringRef NameRef = Filename.toStringRef(NameBuf);
|
||||
|
||||
if (NameRef == "-")
|
||||
return getSTDIN();
|
||||
return getFile(Filename, FileSize);
|
||||
return getFile(Filename, FileSize, RequiresNullTerminator);
|
||||
}
|
||||
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer>>
|
||||
|
||||
Reference in New Issue
Block a user