[all-commits] [llvm/llvm-project] 8f9ca5: [ObjectYAML][DWARF] Collect diagnostic message whe...
Xing GUO via All-commits
all-commits at lists.llvm.org
Mon Jun 29 01:09:46 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 8f9ca561a2bd9d373d4a4ad0cd79a118c5abe4fb
https://github.com/llvm/llvm-project/commit/8f9ca561a2bd9d373d4a4ad0cd79a118c5abe4fb
Author: Xing GUO <higuoxing at gmail.com>
Date: 2020-06-29 (Mon, 29 Jun 2020)
Changed paths:
M llvm/lib/ObjectYAML/DWARFEmitter.cpp
M llvm/unittests/ObjectYAML/CMakeLists.txt
A llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp
Log Message:
-----------
[ObjectYAML][DWARF] Collect diagnostic message when YAMLParser fails.
Before this patch, the diagnostic message is printed to `errs()` directly, which makes it difficult to use `FailedWithMessage()` in unit testing.
In this patch, we add a custom error handler for YAMLParser, which helps collect diagnostic messages and make it easy to use `FailedWithMessage()` to check error messages.
Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D82630
More information about the All-commits
mailing list