llvm-wrapper: adapt for LLVMConstExtractValue removal
This commit is contained in:
parent
a9eb9c52f3
commit
a3a88c73f1
3 changed files with 10 additions and 7 deletions
|
@ -1865,3 +1865,11 @@ extern "C" void LLVMRustGetMangledName(LLVMValueRef V, RustStringRef Str) {
|
|||
GlobalValue *GV = unwrap<GlobalValue>(V);
|
||||
Mangler().getNameWithPrefix(OS, GV, true);
|
||||
}
|
||||
|
||||
// LLVMGetAggregateElement was added in LLVM 15. For earlier LLVM versions just
|
||||
// use its implementation.
|
||||
#if LLVM_VERSION_LT(15, 0)
|
||||
extern "C" LLVMValueRef LLVMGetAggregateElement(LLVMValueRef C, unsigned Idx) {
|
||||
return wrap(unwrap<Constant>(C)->getAggregateElement(Idx));
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue