As we now store ContainerInfo objects in OICodeGen::Config, we can not
copy it any more. Change all places that took copies to take const
references instead.
The copy in OICodeGen modified membersToStub, the contents of which form
part of OICache's hash. However, as OICache also previously had its own
copy, it would not have been OICodeGen's modifications.
- Change member and parent offsets to work in bits, not bytes
- Printer still displays offsets in bytes, with decimals when using
bitfields
- AddPadding: Don't pad bitfields
- CodeGen: Emit code for bitfields
For std::vector and std::list, template parameters are not required to
be defined before they can be used. Delay sorting them until the end.
Also fix a CodeGen bug where we were defining typedefs in the middle of
the forward declarations. They only need to be defined when other types
are defined.
Multiple jobs are not allowed to persist the same files to a workspace.
This commit takes the lazy approach of splitting the type-graph and
non-type-graph jobs into different workspaces and creating a second
coverage job to avoid the conflict.
These represent types which don't store any interesting data for us to
measure, but which are required by a real container so can not be
replaced with our own generated class types.
std::allocator often has bad DWARF, so it must be replaced after the
DWARF is fixed up in Flattener. The others could be replaced earlier in
the transformation process if desired, but I've left them all together
for simplicity for now.
This fixes the folly::fbstring tests.
CTest can't forward command line arguments to the test runner, so add
the option to using an environment variable to enable features instead.
CMake issue tracking the feature that would have been needed:
https://gitlab.kitware.com/cmake/cmake/-/issues/20470
Tests which aren't passing yet have been disabled in CI.
The worry about doing this earlier was performance, but on a further
reading of the code, both legacy OICodeGen and new DrgnParser have been
calling into drgn_type_fully_qualified_name() for every class for a long
time already.
We want to use the fully qualified name for scoped enums to keep the C++
compiler happy. When a parameter expects an enum value, we must supply
an enum value and not its underlying integer value.
Before:
isset_bitset<1, 0>
After:
isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked>
The C++ compiler generates implicit branches for exception handling,
which is particularly common when calling standard library functions.
It's not generally useful to have tests for the case when
std::vector::push_back fails due to an out-of-memory condition, so in
this PR we use a feature in the latest lcov release to filter out these
compiler-generated branches.
Our code coverage numbers consequently go way up!