amd/common: move llvm helper prototype to ac_llvm_util.h
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 27 Oct 2016 14:48:42 +0000 (16:48 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 3 Nov 2016 09:05:46 +0000 (10:05 +0100)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_llvm_helper.cpp
src/amd/common/ac_llvm_util.h
src/amd/common/ac_nir_to_llvm.c
src/amd/common/ac_nir_to_llvm.h

index 062f0aad92b7be062d7a9359af4297f454e0ccd8..125f5f3d7a9d7594eccddb4a8425ce67ad287fa7 100644 (file)
 #  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;
index 8357fbf3f3e57944d7a6adb068a70a10a5f4942b..25ebc503ac7a16ab094c784b3ca0f28c970d978a 100644 (file)
 
 #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
index c12c506a892aab41a6c5ed4e17254e4a10528038..745baae01e362307926e2004ea3a79dcb96f1f85 100644 (file)
@@ -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"
index a17caf2853e5a3df0b710a121ce2d2b37163f55b..ca06d059a6d0d09fc1c43d15c58e2b64daa3bd88 100644 (file)
@@ -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);