| 4250 | } |
| 4251 | |
| 4252 | void 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 | |
| 4296 | void COFF::MapCompileUnitMethods(int compileUnitId) |
| 4297 | { |
no test coverage detected