Skip to content

Commit fc6d2ec

Browse files
committed
llvm-wrapper: adapt for LLVM 20 API changes
No functional changes intended. Adapts llvm-wrapper for the LLVM commit llvm/llvm-project@0f22d47.
1 parent 4d7c095 commit fc6d2ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -1618,9 +1618,15 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
16181618
CfiFunctionDecls.insert(
16191619
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
16201620

1621+
#if LLVM_VERSION_GE(20, 0)
1622+
Key = llvm::computeLTOCacheKey(conf, Data->Index, ModId, ImportList,
1623+
ExportList, ResolvedODR, DefinedGlobals,
1624+
CfiFunctionDefs, CfiFunctionDecls);
1625+
#else
16211626
llvm::computeLTOCacheKey(Key, conf, Data->Index, ModId, ImportList,
16221627
ExportList, ResolvedODR, DefinedGlobals,
16231628
CfiFunctionDefs, CfiFunctionDecls);
1629+
#endif
16241630

16251631
LLVMRustStringWriteImpl(KeyOut, Key.c_str(), Key.size());
16261632
}

0 commit comments

Comments
 (0)