| 7477 | } |
| 7478 | |
| 7479 | DbgType* DbgModule::GetConstType(DbgType* innerType) |
| 7480 | { |
| 7481 | auto linkedModule = GetLinkedModule(); |
| 7482 | |
| 7483 | BF_ASSERT(innerType->GetDbgModule()->GetLinkedModule() == linkedModule); |
| 7484 | |
| 7485 | /*auto itr = linkedModule->mConstTypes.find(innerType); |
| 7486 | if (itr != linkedModule->mConstTypes.end()) |
| 7487 | return itr->second;*/ |
| 7488 | |
| 7489 | DbgType* constType = NULL; |
| 7490 | if (linkedModule->mConstTypes.TryGetValue(innerType, &constType)) |
| 7491 | return constType; |
| 7492 | |
| 7493 | BP_ALLOC_T(DbgType); |
| 7494 | constType = mAlloc.Alloc<DbgType>(); |
| 7495 | constType->mCompileUnit = innerType->mCompileUnit; |
| 7496 | constType->mLanguage = innerType->mLanguage; |
| 7497 | constType->mTypeCode = DbgType_Const; |
| 7498 | constType->mTypeParam = innerType; |
| 7499 | constType->mSize = sizeof(addr_target); |
| 7500 | constType->mTypeIdx = (int32)linkedModule->mTypes.size(); |
| 7501 | linkedModule->mTypes.push_back(constType); |
| 7502 | linkedModule->mConstTypes[innerType] = constType; |
| 7503 | |
| 7504 | return constType; |
| 7505 | } |
| 7506 | |
| 7507 | DbgType* DbgModule::GetPrimaryType(DbgType* dbgType) |
| 7508 | { |
no test coverage detected