compare-transform-pass.so.cc:85:13: error: no viable conversion from 'llvm::Function' to 'llvm::Function *'
Function* tolowerFn = cast<Function>(c);
^ ~~~~~~~~~~~~~~~~~
In file included from compare-transform-pass.so.cc:22:
In file included from /usr/local/llvm90/include/llvm/IR/IRBuilder.h:22:
In file included from /usr/local/llvm90/include/llvm/IR/BasicBlock.h:22:
In file included from /usr/local/llvm90/include/llvm/IR/Instruction.h:21:
In file included from /usr/local/llvm90/include/llvm/IR/DebugLoc.h:17:
In file included from /usr/local/llvm90/include/llvm/IR/TrackingMDRef.h:16:
In file included from /usr/local/llvm90/include/llvm/IR/Metadata.h:28:
In file included from /usr/local/llvm90/include/llvm/IR/Constant.h:16:
In file included from /usr/local/llvm90/include/llvm/IR/User.h:23:
In file included from /usr/local/llvm90/include/llvm/IR/Use.h:29:
In file included from /usr/local/llvm90/include/llvm/Support/CBindingWrapping.h:17:
/usr/local/llvm90/include/llvm/Support/Casting.h:58:24: error: cannot initialize a parameter of type 'const llvm::Value *' with an rvalue of type 'const llvm::FunctionCallee *'
return To::classof(&Val);
^~~~
/usr/local/llvm90/include/llvm/Support/Casting.h:77:32: note: in instantiation of member function 'llvm::isa_impl<llvm::Function, llvm::FunctionCallee, void>::doit' requested here
return isa_impl<To, From>::doit(Val);
^
/usr/local/llvm90/include/llvm/Support/Casting.h:132:36: note: in instantiation of member function 'llvm::isa_impl_cl<llvm::Function, const llvm::FunctionCallee>::doit' requested here
return isa_impl_cl<To,FromTy>::doit(Val);
^
/usr/local/llvm90/include/llvm/Support/Casting.h:143:70: note: in instantiation of member function 'llvm::isa_impl_wrap<llvm::Function, const llvm::FunctionCallee, const llvm::FunctionCallee>::doit' requested here
/usr/local/llvm90/include/llvm/Support/Casting.h:257:10: note: in instantiation of function template specialization 'llvm::isa<llvm::Function, llvm::FunctionCallee>' requested here
assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
^
compare-transform-pass.so.cc:85:25: note: in instantiation of function template specialization 'llvm::cast<llvm::Function, llvm::FunctionCallee>' requested here
Function* tolowerFn = cast<Function>(c);
^
/usr/local/llvm90/include/llvm/IR/Function.h:774:36: note: passing argument to parameter 'V' here