diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-10-27 16:48:42 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-11-02 12:36:25 +0100 |
commit | 8d767f3b3948bd9fcbda7fc68322424d35e5ba98 (patch) | |
tree | d14f2d74b220cd6676999bc440a1999c1dbdcfd9 | |
parent | 1ef505bb02b00a577c33e1af27d983abd14465e7 (diff) |
amd/common: move llvm helper prototype to ac_llvm_util.h
-rw-r--r-- | src/amd/common/ac_llvm_helper.cpp | 5 | ||||
-rw-r--r-- | src/amd/common/ac_llvm_util.h | 10 | ||||
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 1 | ||||
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.h | 4 |
4 files changed, 13 insertions, 7 deletions
diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp index 062f0aad92..125f5f3d7a 100644 --- a/src/amd/common/ac_llvm_helper.cpp +++ b/src/amd/common/ac_llvm_helper.cpp @@ -31,13 +31,12 @@ # undef DEBUG #endif -#include "ac_nir_to_llvm.h" +#include "ac_llvm_util.h" #include <llvm-c/Core.h> #include <llvm/Target/TargetOptions.h> #include <llvm/ExecutionEngine/ExecutionEngine.h> -extern "C" void -ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes) +void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes) { llvm::Argument *A = llvm::unwrap<llvm::Argument>(val); llvm::AttrBuilder B; diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/common/ac_llvm_util.h index 8357fbf3f3..25ebc503ac 100644 --- a/src/amd/common/ac_llvm_util.h +++ b/src/amd/common/ac_llvm_util.h @@ -28,4 +28,14 @@ #include "amd_family.h" +#ifdef __cplusplus +extern "C" { +#endif + LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family); + +void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes); + +#ifdef __cplusplus +} +#endif diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index c12c506a89..745baae01e 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -22,6 +22,7 @@ */ #include "ac_nir_to_llvm.h" +#include "ac_llvm_util.h" #include "ac_binary.h" #include "sid.h" #include "nir/nir.h" diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/common/ac_nir_to_llvm.h index a17caf2853..ca06d059a6 100644 --- a/src/amd/common/ac_nir_to_llvm.h +++ b/src/amd/common/ac_nir_to_llvm.h @@ -113,7 +113,3 @@ void ac_compile_nir_shader(LLVMTargetMachineRef tm, #define AC_USERDATA_CS_GRID_SIZE 10 -#ifdef __cplusplus -extern "C" -#endif -void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes); |