[LLVMdev] regression? Or did I do something wrong again?

Jonathan Turner probata at hotmail.com
Mon Jun 9 11:34:28 PDT 2008



----------------------------------------
> To: llvmdev at cs.uiuc.edu
>
> hendrik at lovesong:~/dv/llvm/tut$ g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy
> toy.cpp: In member function ‘virtual llvm::Value* NumberExprAST::Codegen()’:
> toy.cpp:359: error: no matching function for call to ‘llvm::ConstantFP::get(const llvm::Type*&, llvm::APFloat)’
> /usr/local/llvm/include/llvm/Constants.h:237: note: candidates are: static llvm::ConstantFP* llvm::ConstantFP::get(const llvm::APFloat&)
> /usr/local/llvm/include/llvm/Constants.h:242: note:                 static llvm::ConstantFP* llvm::ConstantFP::get(const llvm::Type*, double)
> hendrik at lovesong:~/dv/llvm/tut$

I had the same issue.  I think the tutorial is a little out of date.  If you pass in just the raw double instead of wrapping it with the APFloat call, it should work fine.


Jonathan
_________________________________________________________________
It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow



More information about the llvm-dev mailing list