mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
PassWrapper: adapt for llvm/llvm-project@d3d856ad84
LLVM 21 moves to making it more explicit what this function call is doing, but nothing has changed behaviorally, so for now we just adjust to using the new name of the function. @rustbot label llvm-main
This commit is contained in:
parent
a932eb36f8
commit
ff6dad436d
@ -1365,7 +1365,12 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, size_t num_modules,
|
|||||||
// Convert the preserved symbols set from string to GUID, this is then needed
|
// Convert the preserved symbols set from string to GUID, this is then needed
|
||||||
// for internalization.
|
// for internalization.
|
||||||
for (size_t i = 0; i < num_symbols; i++) {
|
for (size_t i = 0; i < num_symbols; i++) {
|
||||||
|
#if LLVM_VERSION_GE(21, 0)
|
||||||
|
auto GUID =
|
||||||
|
GlobalValue::getGUIDAssumingExternalLinkage(preserved_symbols[i]);
|
||||||
|
#else
|
||||||
auto GUID = GlobalValue::getGUID(preserved_symbols[i]);
|
auto GUID = GlobalValue::getGUID(preserved_symbols[i]);
|
||||||
|
#endif
|
||||||
Ret->GUIDPreservedSymbols.insert(GUID);
|
Ret->GUIDPreservedSymbols.insert(GUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1685,11 +1690,11 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
|
|||||||
// Based on the 'InProcessThinBackend' constructor in LLVM
|
// Based on the 'InProcessThinBackend' constructor in LLVM
|
||||||
#if LLVM_VERSION_GE(21, 0)
|
#if LLVM_VERSION_GE(21, 0)
|
||||||
for (auto &Name : Data->Index.cfiFunctionDefs().symbols())
|
for (auto &Name : Data->Index.cfiFunctionDefs().symbols())
|
||||||
CfiFunctionDefs.insert(
|
CfiFunctionDefs.insert(GlobalValue::getGUIDAssumingExternalLinkage(
|
||||||
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
|
GlobalValue::dropLLVMManglingEscape(Name)));
|
||||||
for (auto &Name : Data->Index.cfiFunctionDecls().symbols())
|
for (auto &Name : Data->Index.cfiFunctionDecls().symbols())
|
||||||
CfiFunctionDecls.insert(
|
CfiFunctionDecls.insert(GlobalValue::getGUIDAssumingExternalLinkage(
|
||||||
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
|
GlobalValue::dropLLVMManglingEscape(Name)));
|
||||||
#else
|
#else
|
||||||
for (auto &Name : Data->Index.cfiFunctionDefs())
|
for (auto &Name : Data->Index.cfiFunctionDefs())
|
||||||
CfiFunctionDefs.insert(
|
CfiFunctionDefs.insert(
|
||||||
|
Loading…
Reference in New Issue
Block a user