Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/18698 )

Change subject: IMPALA-11412: CodegenFnPtr<FuncType>::store() has a compile 
time error when instantiated
......................................................................

IMPALA-11412: CodegenFnPtr<FuncType>::store() has a compile time error
when instantiated

The function template 'CodegenFnPtr<FuncType>::store()' tries to
implicitly cast a function pointer to 'void*', which is a compile time
error. The reason this hasn't come up in the builds is that this
function template is currently not used anywhere, and the function
pointers are stored through the parent class, using
'CodegenFnPtrBase::store()', which  takes a 'void*'.

This commit adds the correct explicit cast from function pointer to
'void*' in 'CodegenFnPtr<FuncType>::store()' and adds tests which
instantiate (and test) this function template.

Testing:
 - Added tests in llvm-codegen-test.cc that assert that
   'CodegenFnPtr<FuncType>::load()' gives back the same function pointer
   that we store in the object. One test stores the function pointer as
   a 'void*' through 'CodegenFnPtrBase' and the other as a typed
   function pointer through 'CodegenFnPtr<FuncType>'.

Change-Id: I86c78b6237630403db6ca14a3d3e1cffe0e477db
Reviewed-on: http://gerrit.cloudera.org:8080/18698
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/codegen/codegen-fn-ptr.h
M be/src/codegen/llvm-codegen-test.cc
2 files changed, 21 insertions(+), 1 deletion(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/18698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I86c78b6237630403db6ca14a3d3e1cffe0e477db
Gerrit-Change-Number: 18698
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Becker <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Gabor Kaszab <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>

Reply via email to