HomePhabricator

[intel-pt] Refactor the JSON parsing

Authored by Walter Erquinigo <wallace@fb.com> on Sep 24 2020, 1:39 PM.

Description

[intel-pt] Refactor the JSON parsing

Recently https://reviews.llvm.org/D88103 introduced a nice API for
converting a JSON object into C++ types, which include nice error
messaging.

I'm using that new functioniality to perform the parsing in a much more
elegant way. As a result, the code looks simpler and more maintainable,
as we aren't parsing anymore individual fields manually.

I updated the test cases accordingly.

Differential Revision: https://reviews.llvm.org/D88264

Event Timeline

Walter Erquinigo <wallace@fb.com> committed rGbddebca61ea7: [intel-pt] Refactor the JSON parsing (authored by Walter Erquinigo <wallace@fb.com>).Sep 24 2020, 4:35 PM