| 3276 | } |
| 3277 | |
| 3278 | BeFunction* BeModule::CreateFunction(BeFunctionType* funcType, BfIRLinkageType linkageType, const StringImpl& name) |
| 3279 | { |
| 3280 | auto func = mOwnedValues.Alloc<BeFunction>(); |
| 3281 | func->mName = name; |
| 3282 | func->mModule = this; |
| 3283 | func->mType = mContext->GetPointerTo(funcType); |
| 3284 | func->mLinkageType = linkageType; |
| 3285 | func->mParams.Resize(funcType->mParams.size()); |
| 3286 | mFunctions.push_back(func); |
| 3287 | |
| 3288 | #ifdef _DEBUG |
| 3289 | // It IS possible hit this, especially if we have multiple intrinsics mapping to 'malloc' for example |
| 3290 | //BF_ASSERT(mFunctionMap.TryAdd(name, func)); |
| 3291 | #endif |
| 3292 | return func; |
| 3293 | } |
| 3294 | |
| 3295 | BeDbgLoc* BeModule::GetCurrentDebugLocation() |
| 3296 | { |
no test coverage detected