Error in Hello World Pass


I am trying to compile the Hello World pass (described at in an LLVM Project and I get an error, 'no match for ‘operator<<’ at line

llvm::cerr << "*Hello:* " << F.getName() << "\n";

But when I looked up in the LLVM API Documentation, I think "<<" operator is not overloaded for the StringRef class returned by getName() of the Function class. If I replace the above line with 

Yeah, I just had to make a similar change to some of the code in my pass. I think the API changed and no one bothered to update the docs.


Rakesh Komuravelli wrote:

I updated the documentation. You should use errs() From raw_ostream.h now, thanks.