Skip to content

Commit

Permalink
Add comment to serialise() and mention a design decision.
Browse files Browse the repository at this point in the history
  • Loading branch information
vext01 committed Nov 17, 2023
1 parent b8da34b commit b3bddfd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions llvm/lib/YkIR/YkIRWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,14 @@ class YkIRWriter {
YkIRWriter(Module &M, MCStreamer &OutStreamer)
: M(M), OutStreamer(OutStreamer) {}

// Entry point for IR serialisation.
//
// The order of serialisation matters.
//
// - Serialising functions can introduce new types and constants.
// - Serialising constants can introduce new types.
//
// So we must serialise functions, then constants, then types.
void serialise() {
// header:
OutStreamer.emitInt32(Magic);
Expand Down

0 comments on commit b3bddfd

Please sign in to comment.