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

Method MapCompileUnitMethods

IDEHelper/COFF.cpp:4252–4294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4250}
4251
4252void COFF::MapCompileUnitMethods(DbgCompileUnit* compileUnit)
4253{
4254 bool addHotTypes = (IsObjectFile()) && (mHotPrimaryTypes.size() == 0);
4255
4256 DbgSubprogram* prevDbgMethod = NULL;
4257 DbgSubprogram* dbgMethod = compileUnit->mOrphanMethods.mHead;
4258 while (dbgMethod != NULL)
4259 {
4260 auto nextDbgMethod = dbgMethod->mNext;
4261 bool movedMethod = false;
4262 if (dbgMethod->mHasQualifiedName)
4263 {
4264 char* name = (char*)dbgMethod->mName;
4265 char* lastDblColon = (char*)GetLastDoubleColon(name);
4266
4267 if (lastDblColon != NULL)
4268 {
4269 dbgMethod->mName = lastDblColon + 2;
4270 dbgMethod->mHasQualifiedName = false;
4271 const char* typeName = name;
4272 *lastDblColon = 0;
4273
4274 DbgType* parentType = CvGetTypeOrNamespace(name);
4275 if (parentType != NULL)
4276 {
4277 if (addHotTypes)
4278 {
4279 mHotPrimaryTypes.Add(parentType);
4280 }
4281
4282 compileUnit->mOrphanMethods.Remove(dbgMethod, prevDbgMethod);
4283 parentType->mMethodList.PushBack(dbgMethod);
4284 dbgMethod->mParentType = parentType;
4285 movedMethod = true;
4286 }
4287 }
4288 }
4289
4290 if (!movedMethod)
4291 prevDbgMethod = dbgMethod;
4292 dbgMethod = nextDbgMethod;
4293 }
4294}
4295
4296void COFF::MapCompileUnitMethods(int compileUnitId)
4297{

Callers 4

CheckTypeMethod · 0.45
DoLookupFieldMethod · 0.45
DoLookupIdentifierMethod · 0.45
GetModuleInfoMethod · 0.45

Calls 5

GetLastDoubleColonFunction · 0.85
sizeMethod · 0.45
AddMethod · 0.45
RemoveMethod · 0.45
PushBackMethod · 0.45

Tested by

no test coverage detected