Adapt to LLVM dropping CfiFunctionIndex::begin()/end()
After https://github.com/llvm/llvm-project/pull/130382, RustWrapper needs to call CfiFunctionIndex::symbols() instead.
This commit is contained in:
parent
aaa2d47dae
commit
eb2e421e36
1 changed files with 9 additions and 0 deletions
|
@ -1682,12 +1682,21 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
|
|||
#endif
|
||||
|
||||
// Based on the 'InProcessThinBackend' constructor in LLVM
|
||||
#if LLVM_VERSION_GE(21, 0)
|
||||
for (auto &Name : Data->Index.cfiFunctionDefs().symbols())
|
||||
CfiFunctionDefs.insert(
|
||||
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
|
||||
for (auto &Name : Data->Index.cfiFunctionDecls().symbols())
|
||||
CfiFunctionDecls.insert(
|
||||
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
|
||||
#else
|
||||
for (auto &Name : Data->Index.cfiFunctionDefs())
|
||||
CfiFunctionDefs.insert(
|
||||
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
|
||||
for (auto &Name : Data->Index.cfiFunctionDecls())
|
||||
CfiFunctionDecls.insert(
|
||||
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
|
||||
#endif
|
||||
|
||||
#if LLVM_VERSION_GE(20, 0)
|
||||
Key = llvm::computeLTOCacheKey(conf, Data->Index, ModId, ImportList,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue