diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-29 15:50:29 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-29 15:50:29 +0000 |
| commit | 1dfe0cdd1de44d6c8b94c4e902a731655f8972c9 (patch) | |
| tree | 326812daa6c1351ac23f3a94bd14e3d480febe85 /src/types.cpp | |
| parent | 97c66c9c732af1e0735ee3f48a8af08b199bddf9 (diff) | |
Simplify hashing approach `map`
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp index 5c8db71e1..26f187a62 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1922,6 +1922,9 @@ bool is_type_comparable(Type *t) { return is_type_comparable(t->Opaque.elem); case Type_Struct: + if (type_size_of(t) == 0) { + return false; + } if (t->Struct.is_raw_union) { return is_type_simple_compare(t); } |