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

Fixed issue with splat locals named 'alias'

This commit is contained in:
Brian Fiete 2020-07-12 06:27:43 -07:00 committed by James Orson
parent 665f88650a
commit 62a28e46be

View file

@ -3234,7 +3234,7 @@ void COFF::ParseCompileUnit_Symbols(DbgCompileUnit* compileUnit, uint8* sectionD
// This $alias$ hack is unfortunate, but LLVM gets confused when we attempt to tie multiple debug variables
// to the same memory location, which can happen during mixin injection. The result is that the mixin gets
// some premature instructions attributed to it from the variable declaration. This fixes that.
if (aliasPos != NULL)
if ((aliasPos != NULL) && (aliasPos > localVar->mName))
{
String findName = String(aliasPos + 7);
localVar->mName = CvDupString(localVar->mName + 1, aliasPos - localVar->mName - 1);