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 {
169
169
return getIndex (&M, F);
170
170
}
171
171
172
- public:
173
- YkIRWriter (Module &M, MCStreamer &OutStreamer)
174
- : M(M), OutStreamer(OutStreamer) {}
175
-
176
172
// Serialises a null-terminated string.
177
173
void serialiseString (StringRef S) {
178
174
OutStreamer.emitBinaryData (S);
@@ -489,6 +485,18 @@ class YkIRWriter {
489
485
}
490
486
}
491
487
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.
492
500
void serialise () {
493
501
// header:
494
502
OutStreamer.emitInt32 (Magic);
You can’t perform that action at this time.
0 commit comments