File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,6 @@ class YkIRWriter {
169169 return getIndex (&M, F);
170170 }
171171
172- public:
173- YkIRWriter (Module &M, MCStreamer &OutStreamer)
174- : M(M), OutStreamer(OutStreamer) {}
175-
176172 // Serialises a null-terminated string.
177173 void serialiseString (StringRef S) {
178174 OutStreamer.emitBinaryData (S);
@@ -489,6 +485,18 @@ class YkIRWriter {
489485 }
490486 }
491487
488+ public:
489+ YkIRWriter (Module &M, MCStreamer &OutStreamer)
490+ : M(M), OutStreamer(OutStreamer) {}
491+
492+ // Entry point for IR serialisation.
493+ //
494+ // The order of serialisation matters.
495+ //
496+ // - Serialising functions can introduce new types and constants.
497+ // - Serialising constants can introduce new types.
498+ //
499+ // So we must serialise functions, then constants, then types.
492500 void serialise () {
493501 // header:
494502 OutStreamer.emitInt32 (Magic);
You can’t perform that action at this time.
0 commit comments