summaryrefslogtreecommitdiff
path: root/gcc/type-reconstructor.c
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-06-22 16:50:31 +0200
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-06-26 12:42:32 +0200
commite7c4996adabe26463cff56d66f5fe3ccabdcb64a (patch)
tree6c88c6a1a6327195f85a2e45306280b8a62f7918 /gcc/type-reconstructor.c
parenteedbb7e4235b4ea143402760a508d6f14b17cc8e (diff)
I think I need to reorganize which types are sent to the reconstructor
Diffstat (limited to 'gcc/type-reconstructor.c')
-rw-r--r--gcc/type-reconstructor.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/type-reconstructor.c b/gcc/type-reconstructor.c
index bcde1890638..f39dec94484 100644
--- a/gcc/type-reconstructor.c
+++ b/gcc/type-reconstructor.c
@@ -76,7 +76,17 @@ TypeReconstructor::get_is_modified(const_tree t)
gcc_assert(in_map);
bool retval = modified_map[t];
modified_map.erase(t);
- return retval;
+
+ bool points_to_record = false;
+ tree tt = (tree)t;
+ while (TREE_TYPE(tt))
+ {
+ tt = TREE_TYPE(tt);
+ }
+ points_to_record = TREE_CODE(tt) == RECORD_TYPE;
+
+
+ return retval && points_to_record;
}
bool
@@ -162,7 +172,7 @@ TypeReconstructor::_walk_ARRAY_TYPE_post(const_tree t)
}
TypeStringifier stringifier;
//std::string name = stringifier.stringify(copy);
- log("are we going to crash is modified %s %s\n", is_modified ? "t" : "f", TypeStringifier::get_type_identifier(t));
+ log("are we going to crash is modified %s %s\n", is_modified ? "t" : "f", TypeStringifier::get_type_identifier(copy).c_str());
if (is_modified) layout_type(copy);
_reorg_map[t] = is_modified ? copy : (tree)t;