[Bf-blender-cvs] [f959f4d2b2d] functions: use ArrayRef in more places

Jacques Lucke noreply at git.blender.org
Mon May 13 10:17:00 CEST 2019


Commit: f959f4d2b2dc4a5d4094bd8c0da642b3c1c5edc5
Author: Jacques Lucke
Date:   Sun May 12 20:07:16 2019 +0200
Branches: functions
https://developer.blender.org/rBf959f4d2b2dc4a5d4094bd8c0da642b3c1c5edc5

use ArrayRef in more places

===================================================================

M	source/blender/functions/backends/llvm/builder.cpp
M	source/blender/functions/backends/llvm/builder.hpp

===================================================================

diff --git a/source/blender/functions/backends/llvm/builder.cpp b/source/blender/functions/backends/llvm/builder.cpp
index e9d7ab9fc84..dc3e47ef0af 100644
--- a/source/blender/functions/backends/llvm/builder.cpp
+++ b/source/blender/functions/backends/llvm/builder.cpp
@@ -14,11 +14,6 @@ LLVMTypes CodeBuilder::types_of_values(LLVMValuesRef values)
   return types;
 }
 
-LLVMTypes CodeBuilder::types_of_values(const LLVMValues &values)
-{
-  return this->types_of_values(LLVMValuesRef(values));
-}
-
 static llvm::Function *create_wrapper_function(llvm::Module *module,
                                                llvm::FunctionType *ftype,
                                                void *func_ptr,
@@ -102,7 +97,7 @@ void CodeBuilder::CreateAssertFalse(std::string message)
 /* Printing
  **********************************/
 
-void CodeBuilder::CreatePrintf(const char *format, const LLVMValues &values)
+void CodeBuilder::CreatePrintf(const char *format, LLVMValuesRef values)
 {
   llvm::FunctionType *printf_ftype = llvm::TypeBuilder<int(char *, ...), false>::get(
       this->getContext());
@@ -130,7 +125,7 @@ static void print_stacktrace(ExecutionContext *context)
 
 void CodeBuilder::CreatePrintfWithStacktrace(llvm::Value *context_ptr,
                                              const char *format,
-                                             const LLVMValues &values)
+                                             LLVMValuesRef values)
 {
   this->CreateCallPointer(
       (void *)print_stacktrace, {context_ptr}, this->getVoidTy(), "Print Stacktrace");
diff --git a/source/blender/functions/backends/llvm/builder.hpp b/source/blender/functions/backends/llvm/builder.hpp
index 96c111aa1fe..43249388c39 100644
--- a/source/blender/functions/backends/llvm/builder.hpp
+++ b/source/blender/functions/backends/llvm/builder.hpp
@@ -187,7 +187,6 @@ class CodeBuilder {
   }
 
   LLVMTypes types_of_values(LLVMValuesRef values);
-  LLVMTypes types_of_values(const LLVMValues &values);
 
   /* Instruction Builders
    **************************************/
@@ -442,10 +441,10 @@ class CodeBuilder {
   /* Print
    **************************************/
 
-  void CreatePrintf(const char *format, const LLVMValues &values = {});
+  void CreatePrintf(const char *format, LLVMValuesRef values = {});
   void CreatePrintfWithStacktrace(llvm::Value *context_ptr,
                                   const char *format,
-                                  const LLVMValues &values);
+                                  LLVMValuesRef values);
 
   /* Control Flow Construction
    **************************************/



More information about the Bf-blender-cvs mailing list