]>
git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/cpp/src/gandiva/llvm_includes.h
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing,
12 // software distributed under the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
22 #pragma warning(disable : 4141)
23 #pragma warning(disable : 4146)
24 #pragma warning(disable : 4244)
25 #pragma warning(disable : 4267)
26 #pragma warning(disable : 4291)
27 #pragma warning(disable : 4624)
30 #include <llvm/ExecutionEngine/ExecutionEngine.h>
31 #include <llvm/IR/IRBuilder.h>
32 #include <llvm/IR/LLVMContext.h>
33 #include <llvm/IR/Module.h>
35 #if LLVM_VERSION_MAJOR >= 10
36 #define LLVM_ALIGN(alignment) (llvm::Align((alignment)))
38 #define LLVM_ALIGN(alignment) (alignment)
45 // Workaround for deprecated builder methods as of LLVM 13: ARROW-14363
46 inline llvm::Value
* CreateGEP(llvm::IRBuilder
<>* builder
, llvm::Value
* Ptr
,
47 llvm::ArrayRef
<llvm::Value
*> IdxList
,
48 const llvm::Twine
& Name
= "") {
49 return builder
->CreateGEP(Ptr
->getType()->getScalarType()->getPointerElementType(), Ptr
,
53 inline llvm::LoadInst
* CreateLoad(llvm::IRBuilder
<>* builder
, llvm::Value
* Ptr
,
54 const llvm::Twine
& Name
= "") {
55 return builder
->CreateLoad(Ptr
->getType()->getPointerElementType(), Ptr
, Name
);