diff options
author | George Rimar <grimar@accesssoftek.com> | 2019-09-13 16:00:16 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2019-09-13 16:00:16 +0000 |
commit | 850110272783e85bc79d9fad64add5d303a23ad1 (patch) | |
tree | aa900898c68a57f1ccb06d2aeb297b10373e6622 /llvm/lib/ObjectYAML/MinidumpEmitter.cpp | |
parent | 7b81a13bfcd1d92f478109f1c87971dafba639d2 (diff) | |
download | bcm5719-llvm-850110272783e85bc79d9fad64add5d303a23ad1.tar.gz bcm5719-llvm-850110272783e85bc79d9fad64add5d303a23ad1.zip |
[yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers.
This is a continuation of the YAML library error reporting
refactoring/improvement and the idea by itself was mentioned
in the following thread:
https://reviews.llvm.org/D67182?id=218714#inline-603404
This performs a cleanup of all object emitters in the library.
It allows using the custom one provided by the caller.
One of the nice things is that each tool can now print its tool name,
e.g: "yaml2obj: error: <text>"
Also, the code became a bit simpler.
Differential revision: https://reviews.llvm.org/D67445
llvm-svn: 371865
Diffstat (limited to 'llvm/lib/ObjectYAML/MinidumpEmitter.cpp')
-rw-r--r-- | llvm/lib/ObjectYAML/MinidumpEmitter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ObjectYAML/MinidumpEmitter.cpp b/llvm/lib/ObjectYAML/MinidumpEmitter.cpp index cc28f96a44a..31a839e524c 100644 --- a/llvm/lib/ObjectYAML/MinidumpEmitter.cpp +++ b/llvm/lib/ObjectYAML/MinidumpEmitter.cpp @@ -198,7 +198,8 @@ static Directory layout(BlobAllocator &File, Stream &S) { namespace llvm { namespace yaml { -bool yaml2minidump(MinidumpYAML::Object &Obj, raw_ostream &Out) { +bool yaml2minidump(MinidumpYAML::Object &Obj, raw_ostream &Out, + ErrorHandler /*EH*/) { BlobAllocator File; File.allocateObject(Obj.Header); |