mirror of
https://github.com/apple/swift.git
synced 2026-10-10 13:50:43 +02:00
Metadata nodes now carry persistent print IDs, and printing no longer renumbers them into canonical order unless asked to. Final textual IR output must call `Module::renumberMetadataForAssembly()` or use `PrintModulePass` with `ShouldRenumberMetadata`, as `clang` and `opt` now do. Otherwise metadata gets gaps and a non-canonical definition order. Request renumbering on every path that writes a standalone .ll file: `-emit-ir`, `-emit-irgen`, `-save-ir`, `-save-irgen`, `sil-llvm-gen` and `swift-llvm-opt`. See https://github.com/llvm/llvm-project/commit/dd7236de4812ff2c4dc28e2b2948e3f35586d33b (https://github.com/llvm/llvm-project/pull/220390).