1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Change Beefy::defer to be simpler (no std::function), macOS changes

This commit is contained in:
Brian Fiete 2019-10-15 12:28:21 -07:00
parent 3bf4c792d8
commit c8ca66ec5c
18 changed files with 168 additions and 221 deletions

View file

@ -956,31 +956,6 @@ void BfModule::FinishInit()
mBfIRBuilder->Module_SetTargetTriple(mCompiler->mOptions.mTargetTriple);
// #ifdef BF_PLATFORM_WINDOWS
// if (mCompiler->mOptions.mToolsetType == BfToolsetType_GNU)
// {
// if (mCompiler->mOptions.mMachineType == BfMachineType_x86)
// mBfIRBuilder->Module_SetTargetTriple("i686-pc-windows-gnu");
// else
// mBfIRBuilder->Module_SetTargetTriple("x86_64-pc-windows-gnu");
// }
// else //if (mCompiler->mOptions.mToolsetType == BfToolsetType_Microsoft)
// {
// if (mCompiler->mOptions.mMachineType == BfMachineType_x86)
// mBfIRBuilder->Module_SetTargetTriple("i686-pc-windows-msvc");
// else
// mBfIRBuilder->Module_SetTargetTriple("x86_64-pc-windows-msvc");
// }
// #elif defined BF_PLATFORM_LINUX
// if (mCompiler->mOptions.mMachineType == BfMachineType_x86)
// mBfIRBuilder->Module_SetTargetTriple("i686-unknown-linux-gnu");
// else
// mBfIRBuilder->Module_SetTargetTriple("x86_64-unknown-linux-gnu");
// #else
// // Leave it default
// mBfIRBuilder->Module_SetTargetTriple("");
// #endif
mBfIRBuilder->SetBackend(IsTargetingBeefBackend());
if (moduleOptions.mOptLevel == BfOptLevel_OgPlus)
@ -991,15 +966,6 @@ void BfModule::FinishInit()
mHasFullDebugInfo = moduleOptions.mEmitDebugInfo == 1;
// We need to create DIBuilder for mIsSpecialModule so we have it around when we need it
// if ((!mCompiler->mIsResolveOnly) && ((mIsScratchModule) || (moduleOptions.mEmitDebugInfo != 0)))
// {
// BF_ASSERT((!mBfIRBuilder->mIgnoreWrites) || (mIsScratchModule) || (!mIsReified));
// mBfIRBuilder->DbgInit();
// }
// else
// mHasFullDebugInfo = false;
if ((!mCompiler->mIsResolveOnly) && (!mIsScratchModule) && (moduleOptions.mEmitDebugInfo != 0) && (mIsReified))
{
mBfIRBuilder->DbgInit();