modified merge_types() to skip work if given identical types, which

also preserves type names (useful for -O gen-C++)
This commit is contained in:
Vern Paxson 2024-12-06 16:16:35 -08:00
parent a2a47ba334
commit 7ed3f79c87

View file

@ -2376,6 +2376,9 @@ TypeListPtr merge_list_types(const Type* t1, const Type* t2) {
}
TypePtr merge_types(const TypePtr& arg_t1, const TypePtr& arg_t2) {
if ( arg_t1 == arg_t2 )
return arg_t1;
auto t1 = arg_t1.get();
auto t2 = arg_t2.get();
// t1 = flatten_type(t1);