1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added back the "wantsDIForwardDecl = false" for LLVM

Not having this extra type information was causing types like enums to come out as 'void' in debug information due to (seemingly) an LLVM bug with forward decls
This commit is contained in:
Brian Fiete 2019-12-21 05:46:24 -08:00
parent 42452fe09c
commit 939c818581
3 changed files with 18 additions and 7 deletions

View file

@ -1887,9 +1887,10 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
// Types that don't have a proper 'defining module' need to be defined in every module they are used
bool wantsDIForwardDecl = (type->GetModule() != mModule) && (!type->IsFunction());
// Forward declarations of valuetypes doesn't work in LLVM backend for Win32.....
// if ((!mIsBeefBackend) && (type->IsValueType()))
// wantsDIForwardDecl = false;
// Forward declarations of valuetypes don't work in LLVM backend for Win32.....
//TODO: Why was this commented out?
if ((!mIsBeefBackend) && (type->IsValueType()))
wantsDIForwardDecl = false;
if (mModule->mExtensionCount != 0)
wantsDIForwardDecl = true;
if (forceDbgDefine)