Skip to content

Commit 0847dae

Browse files
committed
call renumberMetadataForAssembly() in LLVMRustPrintModule()
1 parent 6b410a8 commit 0847dae

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)