| 401 | } |
| 402 | |
| 403 | void BeCOFFObject::DbgMakeFuncType(BeDbgFunction* dbgFunc) |
| 404 | { |
| 405 | if (dbgFunc->mCvTypeId != -1) |
| 406 | return; |
| 407 | |
| 408 | /*auto funcTypeResultPair = mFuncTypeSet.insert(dbgFunc); |
| 409 | if (!funcTypeResultPair.second) |
| 410 | { |
| 411 | // This matchesInlineScope another signature so we don't need to redefine it |
| 412 | dbgFunc->mCvTypeId = (*funcTypeResultPair.first)->mCvTypeId; |
| 413 | return; |
| 414 | }*/ |
| 415 | |
| 416 | COFFFuncTypeRef* funcTypeRefPtr = NULL; |
| 417 | if (!mFuncTypeSet.TryAdd(dbgFunc, &funcTypeRefPtr)) |
| 418 | { |
| 419 | // This matchesInlineScope another signature so we don't need to redefine it |
| 420 | dbgFunc->mCvTypeId = funcTypeRefPtr->mFunc->mCvTypeId; |
| 421 | return; |
| 422 | } |
| 423 | |
| 424 | auto dbgType = BeValueDynCast<BeDbgType>(dbgFunc->mScope); |
| 425 | |
| 426 | auto& outT = mDebugTSect.mData; |
| 427 | |
| 428 | for (auto genericArgType : dbgFunc->mGenericArgs) |
| 429 | DbgGetTypeId(genericArgType); |
| 430 | |
| 431 | auto parentType = BeValueDynCast<BeDbgType>(dbgFunc->mScope); |
| 432 | DbgGetTypeId(parentType); |
| 433 | for (auto funcParam : dbgFunc->mType->mParams) |
| 434 | DbgGetTypeId(funcParam); |
| 435 | DbgGetTypeId(dbgFunc->mType->mReturnType); |
| 436 | for (auto paramType : dbgFunc->mType->mParams) |
| 437 | DbgGetTypeId(paramType); |
| 438 | |
| 439 | bool hasThis = dbgFunc->HasThis(); |
| 440 | |
| 441 | /*auto argListResultPair = mArgListSet.insert(dbgFunc); |
| 442 | if (!argListResultPair.second) |
| 443 | { |
| 444 | dbgFunc->mCvArgListId = (*argListResultPair.first)->mCvArgListId; |
| 445 | } |
| 446 | else*/ |
| 447 | |
| 448 | COFFArgListRef* argListRefPtr = NULL; |
| 449 | if (!mArgListSet.TryAdd(dbgFunc, &argListRefPtr)) |
| 450 | { |
| 451 | dbgFunc->mCvArgListId = argListRefPtr->mFunc->mCvArgListId; |
| 452 | } |
| 453 | else |
| 454 | { |
| 455 | dbgFunc->mCvArgListId = mCurTagId++; |
| 456 | DbgTStartTag(); |
| 457 | outT.Write((int16)LF_ARGLIST); |
| 458 | outT.Write((int32)(dbgFunc->mType->mParams.size() - (hasThis ? 1 : 0))); |
| 459 | for (int paramIdx = hasThis ? 1 : 0; paramIdx < (int)dbgFunc->mType->mParams.size(); paramIdx++) |
| 460 | { |
nothing calls this directly
no test coverage detected