MCPcopy Create free account
hub / github.com/beefytech/Beef / GetConstType

Method GetConstType

IDEHelper/DbgModule.cpp:7479–7505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7477}
7478
7479DbgType* 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
7507DbgType* DbgModule::GetPrimaryType(DbgType* dbgType)
7508{

Callers 1

Calls 5

GetLinkedModuleMethod · 0.80
GetDbgModuleMethod · 0.80
TryGetValueMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected