commit 3638614fafa01095492e1391de3ee1aa5d222feb
parent e5997cb83e2b7bd7a197a97c557ea8ad36bfeeea
Author: Tooru Fujisawa <arai_a@mac.com>
Date: Sun, 12 Oct 2025 02:22:13 +0000
Bug 1993705 - Always emit layout field recursively. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D268267
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/build/clang-plugin/mozsearch-plugin/MozsearchIndexer.cpp b/build/clang-plugin/mozsearch-plugin/MozsearchIndexer.cpp
@@ -1345,7 +1345,12 @@ public:
C.getTypeSizeInChars(ptrType).getQuantity());
}
- bool hasTemplate = hasTemplateInHierarchy(cxxDecl);
+ bool emitLayout = false;
+ if (layoutHandling == LayoutHandling::LayoutOnly) {
+ emitLayout = true;
+ } else {
+ emitLayout = hasTemplateInHierarchy(cxxDecl);
+ }
J.attributeBegin("supers");
J.arrayBegin();
@@ -1380,7 +1385,7 @@ public:
J.arrayEnd();
J.attributeEnd();
- if (hasTemplate) {
+ if (emitLayout) {
// In order to reduce the file size, emit the entire super class
// layout only if there's any template class in the hierarchy
// Otherwise the field layout can be constructed with each