[XRay] Fix FunctionRecord serialization
authorDean Michael Berris <dberris@google.com>
Fri, 31 Aug 2018 17:49:59 +0000 (17:49 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 31 Aug 2018 17:49:59 +0000 (17:49 +0000)
commitc1dceee50b9ed73d9e6ed8b5dc5e3336316bd07e
tree44263a432094012797d3fd5fe5f6a7f27274397c
parent5abf7d90ace56e96ebf7b4d72de5a56c8c368d80
[XRay] Fix FunctionRecord serialization

This change makes the writer implementation more consistent with the way
fields are written down to avoid assumptions on bitfield order and
padding. We also fix an inconsistency between the type returned by the
`delta()` accessor to match the data member it's returning.

This is a follow-up to D51289 and D51210.

llvm-svn: 341230
llvm/include/llvm/XRay/FDRRecords.h
llvm/lib/XRay/FDRTraceWriter.cpp