mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
In WriteFunction(), write function-local metadata before we write the instructions, so instruction's references to metadata are fully resolved by the time they get written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
559588b156
commit
8ea5d4c529
@ -1226,6 +1226,9 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
|
|||||||
VE.getFunctionConstantRange(CstStart, CstEnd);
|
VE.getFunctionConstantRange(CstStart, CstEnd);
|
||||||
WriteConstants(CstStart, CstEnd, VE, Stream, false);
|
WriteConstants(CstStart, CstEnd, VE, Stream, false);
|
||||||
|
|
||||||
|
// If there is function-local metadata, emit it now.
|
||||||
|
WriteFunctionLocalMetadata(VE, Stream);
|
||||||
|
|
||||||
// Keep a running idea of what the instruction ID is.
|
// Keep a running idea of what the instruction ID is.
|
||||||
unsigned InstID = CstEnd;
|
unsigned InstID = CstEnd;
|
||||||
|
|
||||||
@ -1241,7 +1244,6 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
|
|||||||
// Emit names for all the instructions etc.
|
// Emit names for all the instructions etc.
|
||||||
WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream);
|
WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream);
|
||||||
|
|
||||||
WriteFunctionLocalMetadata(VE, Stream);
|
|
||||||
WriteMetadataAttachment(F, VE, Stream);
|
WriteMetadataAttachment(F, VE, Stream);
|
||||||
VE.purgeFunction();
|
VE.purgeFunction();
|
||||||
Stream.ExitBlock();
|
Stream.ExitBlock();
|
||||||
|
Loading…
Reference in New Issue
Block a user