| 436 | } |
| 437 | |
| 438 | bool Module::addAlias ( const TypeDeclPtr & at, bool canFail ) { |
| 439 | if ( at->alias.empty() ) return false; |
| 440 | if ( aliasTypes.insert(at->alias, at) ) { |
| 441 | at->module = this; |
| 442 | return true; |
| 443 | } else { |
| 444 | if ( !canFail ) { |
| 445 | DAS_FATAL_ERROR("can't add duplicate alias %s to module %s\n",at->alias.c_str(), name.c_str() ); |
| 446 | } |
| 447 | return false; |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | void Module::registerAnnotation ( AnnotationPtr ptr ) { |
| 452 | auto key = hash64z(ptr->name.c_str()); |
no test coverage detected