mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22: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:
parent
42452fe09c
commit
939c818581
3 changed files with 18 additions and 7 deletions
|
@ -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
|
// 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());
|
bool wantsDIForwardDecl = (type->GetModule() != mModule) && (!type->IsFunction());
|
||||||
// Forward declarations of valuetypes doesn't work in LLVM backend for Win32.....
|
// Forward declarations of valuetypes don't work in LLVM backend for Win32.....
|
||||||
// if ((!mIsBeefBackend) && (type->IsValueType()))
|
//TODO: Why was this commented out?
|
||||||
// wantsDIForwardDecl = false;
|
if ((!mIsBeefBackend) && (type->IsValueType()))
|
||||||
|
wantsDIForwardDecl = false;
|
||||||
if (mModule->mExtensionCount != 0)
|
if (mModule->mExtensionCount != 0)
|
||||||
wantsDIForwardDecl = true;
|
wantsDIForwardDecl = true;
|
||||||
if (forceDbgDefine)
|
if (forceDbgDefine)
|
||||||
|
|
|
@ -1663,8 +1663,7 @@ void DbgType::ToString(StringImpl& str, DbgLanguage language, bool allowDirectBf
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* nameP = (char*)mTypeName;
|
|
||||||
//String combName;
|
//String combName;
|
||||||
/*if (mTemplateParams != NULL)
|
/*if (mTemplateParams != NULL)
|
||||||
{
|
{
|
||||||
|
@ -1677,6 +1676,7 @@ void DbgType::ToString(StringImpl& str, DbgLanguage language, bool allowDirectBf
|
||||||
{
|
{
|
||||||
FixName();
|
FixName();
|
||||||
}
|
}
|
||||||
|
char* nameP = (char*)mTypeName;
|
||||||
|
|
||||||
if (parent == NULL)
|
if (parent == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2285,7 +2285,17 @@ void DbgModule::Fail(const StringImpl& error)
|
||||||
*mFailMsgPtr = error;
|
*mFailMsgPtr = error;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDebugger->OutputRawMessage("error " + error + "\n");
|
String errorStr = "error ";
|
||||||
|
if (!mFilePath.IsEmpty())
|
||||||
|
{
|
||||||
|
errorStr += "Error in ";
|
||||||
|
errorStr += mFilePath;
|
||||||
|
errorStr += ": ";
|
||||||
|
}
|
||||||
|
errorStr += error;
|
||||||
|
errorStr += "\n";
|
||||||
|
|
||||||
|
mDebugger->OutputRawMessage(errorStr);
|
||||||
mFailed = true;
|
mFailed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
USING_NS_BF;
|
USING_NS_BF;
|
||||||
|
|
||||||
DbgModuleMemoryCache::DbgModuleMemoryCache(uintptr addr, int size)
|
DbgModuleMemoryCache::DbgModuleMemoryCache(uintptr addr, int size)
|
||||||
{
|
{
|
||||||
mAddr = addr;
|
mAddr = addr;
|
||||||
mSize = size;
|
mSize = size;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue