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>
<pre><span class="Apple-style-span" style="font-family: arial; white-space: normal;">Thanks,</span></pre><pre><span class="Apple-style-span" style="font-family: arial; white-space: normal;">Rakesh</span></pre></span></pre>
</span></pre></div>