| 496 | } |
| 497 | |
| 498 | void TypeDecl::getLookupHash(uint64_t & hash) const { |
| 499 | hash = hashmix(hash, baseType); |
| 500 | hash = hashmix(hash, flagsWithoutAliasCache(this)); |
| 501 | for ( auto d : dim ) { |
| 502 | hash = hashmix(hash, d); |
| 503 | } |
| 504 | if ( structType ) { |
| 505 | hash = hashmix(hash, intptr_t(structType)); |
| 506 | } else if ( enumType ) { |
| 507 | hash = hashmix(hash, intptr_t(enumType)); |
| 508 | } else if ( annotation ) { |
| 509 | hash = hashmix(hash, intptr_t(annotation)); |
| 510 | } |
| 511 | if ( firstType ) { |
| 512 | firstType->getLookupHash(hash); |
| 513 | } |
| 514 | if ( secondType ) { |
| 515 | secondType->getLookupHash(hash); |
| 516 | } |
| 517 | if (baseType == Type::tBitfield || baseType == Type::tBitfield8 || |
| 518 | baseType == Type::tBitfield16 || baseType == Type::tBitfield64 || |
| 519 | baseType == Type::tVariant || baseType == Type::tTuple |
| 520 | ) { |
| 521 | for ( const auto & name : argNames ) { |
| 522 | hash = hashmix(hash, hash_block64(reinterpret_cast<const uint8_t *>(name.c_str()), name.size())); |
| 523 | } |
| 524 | } |
| 525 | for ( auto & argT : argTypes ) { |
| 526 | argT->getLookupHash(hash); |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | uint64_t TypeDecl::getSemanticHash() const { |
| 531 | HashBuilder hb; |
nothing calls this directly
no test coverage detected