mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01: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.
llvm-svn: 93403
This commit is contained in:
parent
36a22e479a
commit
6878a7e7b6
@ -1226,6 +1226,9 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
|
||||
VE.getFunctionConstantRange(CstStart, CstEnd);
|
||||
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.
|
||||
unsigned InstID = CstEnd;
|
||||
|
||||
@ -1241,7 +1244,6 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
|
||||
// Emit names for all the instructions etc.
|
||||
WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream);
|
||||
|
||||
WriteFunctionLocalMetadata(VE, Stream);
|
||||
WriteMetadataAttachment(F, VE, Stream);
|
||||
VE.purgeFunction();
|
||||
Stream.ExitBlock();
|
||||
|
Loading…
Reference in New Issue
Block a user