2012년 2월 17일 금요일

llvm Kaleidoscope ch3

I have been studying llvm in following http://llvm.org/docs/tutorial/LangImpl3.html.

In compiling example on ch3, i met below errors.


ch3.cpp:401:18: error: no matching member function for call to 'CreateCall'
  return Builder.CreateCall(CalleeF, ArgsV, "calltmp");

ch3.cpp:406:22: error: no matching constructor for initialization of
      'std::vector<Type *>'
  std::vector<Type*> Doubles(Args.size(),Type::getDoubleTy(getGlobalContext()));
                     ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

solution
--------------------------------------------------------

 return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp"); 

 std::vector<const Type *> Doubles(Args.size(), Type::getDoubleTy(getGlobalContext()));


댓글 없음:

댓글 쓰기