<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 4, 2009, at 10:29 AM, Rakesh Komuravelli wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<div><br></div><div>I am trying to compile the Hello World pass (described at <a href="http://llvm.org/docs/WritingAnLLVMPass.html#basiccode">http://llvm.org/docs/WritingAnLLVMPass.html#basiccode</a>) in an LLVM Project and I get an error, 'no match for ‘operator<<’ at line </div>
<div><pre>llvm::cerr << "<i>Hello: </i>" << F.getName() << "\n";
</pre><pre><span class="Apple-style-span" style="font-family: arial; font-size: 13px; white-space: normal; ">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 </span></pre>
<pre><span class="Apple-style-span" style="font-family: arial; font-size: 13px; white-space: normal;"><pre>llvm::cerr << "<i>Hello: </i>" << F.getName().str() << "\n";
</pre><pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; "><pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; ">it compiles fine. I was just wondering if its a bug in the document describing the Hello World pass or am I referring it incorrectly?</span></pre>
</span></pre></span></pre></div></blockquote></div><br><div>I updated the documentation.  You should use errs() From raw_ostream.h now, thanks.</div><div><br></div><div>-Chris</div></body></html>