| 16418 | } |
| 16419 | |
| 16420 | void BfModule::CreateDIRetVal() |
| 16421 | { |
| 16422 | if (!WantsDebugInfo()) |
| 16423 | return; |
| 16424 | |
| 16425 | /*if (!mCurMethodState->mRetVal) |
| 16426 | { |
| 16427 | if (mCurMethodInstance->mMethodDef->mName != "Ziggle") |
| 16428 | return; |
| 16429 | }*/ |
| 16430 | |
| 16431 | if ((mCurMethodState->mRetVal) || (mCurMethodState->mRetValAddr)) |
| 16432 | { |
| 16433 | BfType* dbgType = mCurMethodInstance->mReturnType; |
| 16434 | BfIRValue dbgValue = mCurMethodState->mRetVal.mValue; |
| 16435 | if ((!mIsComptimeModule) && (mCurMethodInstance->GetStructRetIdx() != -1)) |
| 16436 | { |
| 16437 | BF_ASSERT(mCurMethodState->mRetValAddr); |
| 16438 | dbgType = CreatePointerType(dbgType); |
| 16439 | dbgValue = mCurMethodState->mRetValAddr; |
| 16440 | } |
| 16441 | else |
| 16442 | { |
| 16443 | BF_ASSERT(!mCurMethodState->mRetValAddr); |
| 16444 | } |
| 16445 | |
| 16446 | mCurMethodState->mDIRetVal = mBfIRBuilder->DbgCreateAutoVariable(mCurMethodState->mCurScope->mDIScope, |
| 16447 | "@return", mCurFilePosition.mFileInstance->mDIFile, mCurFilePosition.mCurLine, mBfIRBuilder->DbgGetType(dbgType)); |
| 16448 | auto declareCall = mBfIRBuilder->DbgInsertDeclare(dbgValue, mCurMethodState->mDIRetVal); |
| 16449 | } |
| 16450 | } |
| 16451 | |
| 16452 | BfTypedValue BfModule::CreateTuple(const Array<BfTypedValue>& values, const Array<String>& fieldNames) |
| 16453 | { |
nothing calls this directly
no test coverage detected