Fix dbj file reference with optimized variable
This commit is contained in:
parent
1c1d7fefaa
commit
d676ccc1bd
|
@ -1435,6 +1435,7 @@ bool Compiler::WriteDbjFile(const char* filename)
|
|||
InterVariable* v(p->mLocalVars[i]);
|
||||
if (v && v->mIdent)
|
||||
{
|
||||
bool skipped = false;
|
||||
if (v->mLinkerObject)
|
||||
{
|
||||
if (v->mLinkerObject->mFlags & LOBJF_PLACED)
|
||||
|
@ -1450,11 +1451,13 @@ bool Compiler::WriteDbjFile(const char* filename)
|
|||
}
|
||||
else
|
||||
{
|
||||
skipped = true;
|
||||
// Prepared space on the stack but not used
|
||||
}
|
||||
}
|
||||
else if (v->mTemp)
|
||||
{
|
||||
skipped = true;
|
||||
// Promoted to local variable
|
||||
}
|
||||
else if (p->mFramePointer)
|
||||
|
@ -1480,11 +1483,14 @@ bool Compiler::WriteDbjFile(const char* filename)
|
|||
types.IndexOrPush(v->mDeclaration->mBase));
|
||||
}
|
||||
|
||||
if (!skipped)
|
||||
{
|
||||
if (v->mDeclaration)
|
||||
DumpReferences(file, v->mDeclaration);
|
||||
fprintf(file, "}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(file, "]");
|
||||
DumpReferences(file, p->mDeclaration);
|
||||
|
|
Loading…
Reference in New Issue