diff options
author | Eric Beckmann <ecbeckmann@google.com> | 2017-06-13 18:17:36 +0000 |
---|---|---|
committer | Eric Beckmann <ecbeckmann@google.com> | 2017-06-13 18:17:36 +0000 |
commit | 907fb81327510be59976ac3c9976faf48c0d6e13 (patch) | |
tree | 8c94cdadb90f070c1cbe1b239f63e840066debc4 /llvm/lib/Object/WindowsResource.cpp | |
parent | ec768548fb153161f21abdba5bc4d1f27f8d4588 (diff) | |
download | bcm5719-llvm-907fb81327510be59976ac3c9976faf48c0d6e13.tar.gz bcm5719-llvm-907fb81327510be59976ac3c9976faf48c0d6e13.zip |
Improve error messages in order to help with fixing a big-endian bug.
Summary: Added output to stderr so that we can actually see what is happening when the test fails on big endian.
Reviewers: zturner
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D34155
llvm-svn: 305314
Diffstat (limited to 'llvm/lib/Object/WindowsResource.cpp')
-rw-r--r-- | llvm/lib/Object/WindowsResource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Object/WindowsResource.cpp b/llvm/lib/Object/WindowsResource.cpp index 3d689fe1e9a..b1452e8d5e9 100644 --- a/llvm/lib/Object/WindowsResource.cpp +++ b/llvm/lib/Object/WindowsResource.cpp @@ -70,7 +70,7 @@ ResourceEntryRef::ResourceEntryRef(BinaryStreamRef Ref, const WindowsResource *Owner, Error &Err) : Reader(Ref), OwningRes(Owner) { if (loadNext()) - Err = make_error<GenericBinaryError>("Could not read first entry.", + Err = make_error<GenericBinaryError>("Could not read first entry.\n", object_error::unexpected_eof); } @@ -156,8 +156,8 @@ Error WindowsResourceParser::parse(WindowsResource *WR) { return Error::success(); } -void WindowsResourceParser::printTree() const { - ScopedPrinter Writer(outs()); +void WindowsResourceParser::printTree(raw_ostream &OS) const { + ScopedPrinter Writer(OS); Root.print(Writer, "Resource Tree"); } |