summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-08 05:14:44 +0000
committerChris Lattner <sabre@nondot.org>2009-09-08 05:14:44 +0000
commit0ce6f93e9355f339dd3945b9fb0133ef60e5d1a2 (patch)
treee330594e311c05ff23652ca84cc8788a80205151
parentba3598cb1facb2b5aaa8ec47faf2cd07689a3b86 (diff)
downloadllvm-0ce6f93e9355f339dd3945b9fb0133ef60e5d1a2.tar.gz
llvm-0ce6f93e9355f339dd3945b9fb0133ef60e5d1a2.tar.bz2
llvm-0ce6f93e9355f339dd3945b9fb0133ef60e5d1a2.tar.xz
update this to use raw_ostream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81188 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/WritingAnLLVMPass.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/WritingAnLLVMPass.html b/docs/WritingAnLLVMPass.html
index ed6b4d662a..f715a961a0 100644
--- a/docs/WritingAnLLVMPass.html
+++ b/docs/WritingAnLLVMPass.html
@@ -223,12 +223,14 @@ Start out with:</p>
<div class="doc_code"><pre>
<b>#include</b> "<a href="http://llvm.org/doxygen/Pass_8h-source.html">llvm/Pass.h</a>"
<b>#include</b> "<a href="http://llvm.org/doxygen/Function_8h-source.html">llvm/Function.h</a>"
+<b>#include</b> "<a href="http://llvm.org/doxygen/raw__ostream_8h.html">llvm/Support/raw_ostream.h</a>"
</pre></div>
<p>Which are needed because we are writing a <tt><a
-href="http://llvm.org/doxygen/classllvm_1_1Pass.html">Pass</a></tt>, and
+href="http://llvm.org/doxygen/classllvm_1_1Pass.html">Pass</a></tt>,
we are operating on <tt><a
-href="http://llvm.org/doxygen/classllvm_1_1Function.html">Function</a></tt>'s.</p>
+href="http://llvm.org/doxygen/classllvm_1_1Function.html">Function</a></tt>'s,
+and we will be doing some printing.</p>
<p>Next we have:</p>
<div class="doc_code"><pre>
@@ -273,7 +275,7 @@ avoid using expensive C++ runtime information.</p>
<div class="doc_code"><pre>
<b>virtual bool</b> <a href="#runOnFunction">runOnFunction</a>(Function &amp;F) {
- llvm::cerr &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
+ errs() &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
<b>return false</b>;
}
}; <i>// end of struct Hello</i>
@@ -312,6 +314,7 @@ is supplied as fourth argument. </p>
<div class="doc_code"><pre>
<b>#include</b> "<a href="http://llvm.org/doxygen/Pass_8h-source.html">llvm/Pass.h</a>"
<b>#include</b> "<a href="http://llvm.org/doxygen/Function_8h-source.html">llvm/Function.h</a>"
+<b>#include</b> "<a href="http://llvm.org/doxygen/raw__ostream_8h.html">llvm/Support/raw_ostream.h</a>"
<b>using namespace llvm;</b>
@@ -322,7 +325,7 @@ is supplied as fourth argument. </p>
Hello() : FunctionPass(&amp;ID) {}
<b>virtual bool</b> <a href="#runOnFunction">runOnFunction</a>(Function &amp;F) {
- llvm::cerr &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
+ errs() &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
<b>return false</b>;
}
};