diff --git a/oi/CodeGen.cpp b/oi/CodeGen.cpp index 2d0c0eb..3fa0374 100644 --- a/oi/CodeGen.cpp +++ b/oi/CodeGen.cpp @@ -1168,6 +1168,7 @@ void CodeGen::transform(TypeGraph& typeGraph) { // Simplify the type graph first so there is less work for later passes pm.addPass(RemoveTopLevelPointer::createPass()); pm.addPass(Flattener::createPass()); + pm.addPass(AlignmentCalc::createPass()); pm.addPass(IdentifyContainers::createPass(containerInfos_)); pm.addPass(TypeIdentifier::createPass(config_.passThroughTypes)); if (config_.features[Feature::PruneTypeGraph]) @@ -1183,16 +1184,13 @@ void CodeGen::transform(TypeGraph& typeGraph) { // Re-run passes over newly added children pm.addPass(Flattener::createPass()); + pm.addPass(AlignmentCalc::createPass()); pm.addPass(IdentifyContainers::createPass(containerInfos_)); pm.addPass(TypeIdentifier::createPass(config_.passThroughTypes)); if (config_.features[Feature::PruneTypeGraph]) pm.addPass(Prune::createPass()); } - // Calculate alignment before removing members, as those members may have an - // influence on the class' overall alignment. - pm.addPass(AlignmentCalc::createPass()); - pm.addPass(RemoveMembers::createPass(config_.membersToStub)); if (!config_.features[Feature::TreeBuilderV2]) pm.addPass(EnforceCompatibility::createPass()); diff --git a/oi/OITraceCode.cpp b/oi/OITraceCode.cpp index 47e98d7..fa0beda 100644 --- a/oi/OITraceCode.cpp +++ b/oi/OITraceCode.cpp @@ -101,6 +101,8 @@ struct alignas(align) DummySizedOperator { // container if an empty class is passed. template struct DummySizedOperator<0, 0, Id> {}; +template +struct DummySizedOperator<0, 1, Id> {}; template