Skip to content

Commit e6e3455

Browse files
Rollup merge of #162236 - zmodem:metadata_reordering, r=nikic
Call renumberMetadataForAssembly() in LLVMRustPrintModule() Some metadata got reordered in llvm/llvm-project#220390
2 parents e869b5a + 0847dae commit e6e3455

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,9 @@ extern "C" LLVMRustResult LLVMRustPrintModule(LLVMModuleRef M, const char *Path,
11651165
LLVMRustSetLastError(ErrorInfo.c_str());
11661166
return LLVMRustResult::Failure;
11671167
}
1168-
1168+
#if LLVM_VERSION_GE(24, 0)
1169+
unwrap(M)->renumberMetadataForAssembly();
1170+
#endif
11691171
auto AAW = RustAssemblyAnnotationWriter(Demangle);
11701172
auto FOS = formatted_raw_ostream(OS);
11711173
unwrap(M)->print(FOS, &AAW);

0 commit comments

Comments
 (0)