summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2017-02-25 17:04:23 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2017-02-25 17:04:23 +0000
commit05a75e40da0f83639111687799eaab2c07c00ef0 (patch)
tree8ade745eed4316647c5098f24acd74af027ff364 /llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp
parent09ecd3117e151c645d2870409b5a78b2aeac326d (diff)
downloadbcm5719-llvm-05a75e40da0f83639111687799eaab2c07c00ef0.tar.gz
bcm5719-llvm-05a75e40da0f83639111687799eaab2c07c00ef0.zip
Revert r296215, "[PDB] General improvements to Stream library." and followings.
r296215, "[PDB] General improvements to Stream library." r296217, "Disable BinaryStreamTest.StreamReaderObject temporarily." r296220, "Re-enable BinaryStreamTest.StreamReaderObject." r296244, "[PDB] Disable some tests that are breaking bots." r296249, "Add static_cast to silence -Wc++11-narrowing." std::errc::no_buffer_space should be used for OS-oriented errors for socket transmission. (Seek discussions around llvm/xray.) I could substitute s/no_buffer_space/others/g, but I revert whole them ATM. Could we define and use LLVM errors there? llvm-svn: 296258
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp b/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp
index 5e229663844..501188e96f6 100644
--- a/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp
@@ -16,6 +16,7 @@
#include <cstdint>
using namespace llvm;
+using namespace llvm::msf;
using namespace llvm::pdb;
using namespace llvm::support;
@@ -25,15 +26,15 @@ ModInfo::ModInfo(const ModInfo &Info) = default;
ModInfo::~ModInfo() = default;
-Error ModInfo::initialize(BinaryStreamRef Stream, ModInfo &Info) {
- BinaryStreamReader Reader(Stream);
+Error ModInfo::initialize(ReadableStreamRef Stream, ModInfo &Info) {
+ StreamReader Reader(Stream);
if (auto EC = Reader.readObject(Info.Layout))
return EC;
- if (auto EC = Reader.readCString(Info.ModuleName))
+ if (auto EC = Reader.readZeroString(Info.ModuleName))
return EC;
- if (auto EC = Reader.readCString(Info.ObjFileName))
+ if (auto EC = Reader.readZeroString(Info.ObjFileName))
return EC;
return Error::success();
}
OpenPOWER on IntegriCloud