| 4123 | void PrintUsers(llvm::MDNode* md); |
| 4124 | |
| 4125 | BfModuleOptions BfModule::GetModuleOptions() |
| 4126 | { |
| 4127 | if (mIsScratchModule) |
| 4128 | return BfModuleOptions(); |
| 4129 | |
| 4130 | if (mModuleOptions != NULL) |
| 4131 | return *mModuleOptions; |
| 4132 | BfModuleOptions moduleOptions; |
| 4133 | moduleOptions.mEmitDebugInfo = mCompiler->mOptions.mEmitDebugInfo ? 1 : mCompiler->mOptions.mEmitLineInfo ? 2 : 0; |
| 4134 | if (mProject != NULL) |
| 4135 | { |
| 4136 | moduleOptions.mSIMDSetting = mProject->mCodeGenOptions.mSIMDSetting; |
| 4137 | moduleOptions.mOptLevel = mProject->mCodeGenOptions.mOptLevel; |
| 4138 | } |
| 4139 | |
| 4140 | auto headModule = this; |
| 4141 | while (headModule->mParentModule != NULL) |
| 4142 | headModule = headModule->mParentModule; |
| 4143 | |
| 4144 | BF_ASSERT((headModule->mOwnedTypeInstances.size() > 0) || (mModuleName == "vdata") || mIsSpecialModule); |
| 4145 | |
| 4146 | if (headModule->mOwnedTypeInstances.size() > 0) |
| 4147 | { |
| 4148 | auto typeInst = headModule->mOwnedTypeInstances[0]; |
| 4149 | if (typeInst->mTypeOptionsIdx == -2) |
| 4150 | PopulateType(typeInst); |
| 4151 | if (typeInst->mTypeOptionsIdx != -1) |
| 4152 | { |
| 4153 | auto typeOptions = mSystem->GetTypeOptions(typeInst->mTypeOptionsIdx); |
| 4154 | moduleOptions.mSIMDSetting = (BfSIMDSetting)BfTypeOptions::Apply((int)moduleOptions.mSIMDSetting, typeOptions->mSIMDSetting); |
| 4155 | moduleOptions.mEmitDebugInfo = BfTypeOptions::Apply(moduleOptions.mEmitDebugInfo, typeOptions->mEmitDebugInfo); |
| 4156 | moduleOptions.mOptLevel = (BfOptLevel)BfTypeOptions::Apply((int)moduleOptions.mOptLevel, (int)typeOptions->mOptimizationLevel); |
| 4157 | } |
| 4158 | } |
| 4159 | return moduleOptions; |
| 4160 | } |
| 4161 | |
| 4162 | BfCheckedKind BfModule::GetDefaultCheckedKind() |
| 4163 | { |
no test coverage detected