[XRay] Add a BlockVerifier visitor for FDR Records
authorDean Michael Berris <dberris@google.com>
Fri, 7 Sep 2018 02:25:06 +0000 (02:25 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 7 Sep 2018 02:25:06 +0000 (02:25 +0000)
commitb9dd61c13c7c8b353b7ba027f046062668125cd4
treef327e256924cd756fc05905b4f33d4cf892fa601
parentd7acacab94f3eac228c7b66a0c76972c7930dc9e
[XRay] Add a BlockVerifier visitor for FDR Records

Summary:
This patch implements a `BlockVerifier` type which enforces the
invariants of the log structure of FDR mode logs on a per-block basis.
This ensures that the data we encounter from an FDR mode log
semantically correct (i.e. that records follow the documented "grammar"
for FDR mode log records).

This is another part of the refactoring of D50441.

Reviewers: mboerger, eizan

Subscribers: mgorny, hiraditya, llvm-commits

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

llvm-svn: 341628
llvm/include/llvm/XRay/BlockVerifier.h [new file with mode: 0644]
llvm/lib/XRay/BlockVerifier.cpp [new file with mode: 0644]
llvm/lib/XRay/CMakeLists.txt
llvm/unittests/XRay/CMakeLists.txt
llvm/unittests/XRay/FDRBlockVerifierTest.cpp [new file with mode: 0644]