[LLVMdev] Tutorial 1: casting cout
Bill Wendling
isanbard at gmail.com
Tue May 12 11:29:58 PDT 2009
Fixed. Thanks! :-)
-bw
On Tue, May 12, 2009 at 11:16 AM, Scott Ricketts
<sricketts at maxentric.com> wrote:
> To get Tutorial 1 to compile, I had to cast cout as a raw_osstream, as in:
>
> PM.add(createPrintModulePass(&llvm::cout));
>
> ---->
>
> PM.add(createPrintModulePass((raw_ostream*)&llvm::cout));
>
>
> I was getting the following error:
>
> $ c++ -g tut1.cpp `llvm-config --cxxflags --ldflags --libs core` -o tut1
> tut1.cpp: In function ‘int main(int, char**)’:
> tut1.cpp:19: error: cannot convert ‘llvm::OStream*’ to
> ‘llvm::raw_ostream*’ for argument ‘1’ to ‘llvm::ModulePass*
> llvm::createPrintModulePass(llvm::raw_ostream*, bool)’
>
> Anyway, just wanted to mark the record in case this is a bug in the
> tutorial or an inconsistency with the revision of llvm I am running
> (71457). Still, it is likely that the error is a result of me
> overlooking something.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list