diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2023-07-10 00:19:06 -0700 | 
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2023-07-10 00:20:56 -0700 | 
| commit | 0726c7826b81242d986e91535572935b9908b82f (patch) | |
| tree | 7f51499b8103e0d44f7b38346641a5bb05885c48 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 71f71a5397c42fec01f5c1045c638d961fa9f7ca (diff) | |
| download | rust-0726c7826b81242d986e91535572935b9908b82f.tar.gz rust-0726c7826b81242d986e91535572935b9908b82f.zip | |
Reuse LLVMConstInBoundsGEP2
We have had LLVM 14 as our minimum for a bit now.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 11 | 
1 files changed, 0 insertions, 11 deletions
| diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index bb7510b3a53..ab5fa961b95 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1616,17 +1616,6 @@ extern "C" void LLVMRustSetLinkage(LLVMValueRef V, LLVMSetLinkage(V, fromRust(RustLinkage)); } -// FIXME: replace with LLVMConstInBoundsGEP2 when bumped minimal version to llvm-14 -extern "C" LLVMValueRef LLVMRustConstInBoundsGEP2(LLVMTypeRef Ty, - LLVMValueRef ConstantVal, - LLVMValueRef *ConstantIndices, - unsigned NumIndices) { - ArrayRef<Constant *> IdxList(unwrap<Constant>(ConstantIndices, NumIndices), - NumIndices); - Constant *Val = unwrap<Constant>(ConstantVal); - return wrap(ConstantExpr::getInBoundsGetElementPtr(unwrap(Ty), Val, IdxList)); -} - extern "C" bool LLVMRustConstIntGetZExtValue(LLVMValueRef CV, uint64_t *value) { auto C = unwrap<llvm::ConstantInt>(CV); if (C->getBitWidth() > 64) | 
