summaryrefslogtreecommitdiffstats
path: root/docs/WritingAnLLVMPass.html
diff options
context:
space:
mode:
authorJonathan Manton <jmanton@uiuc.edu>2004-06-30 18:10:30 +0000
committerJonathan Manton <jmanton@uiuc.edu>2004-06-30 18:10:30 +0000
commit65acb301787c163665df7935d66198b359003959 (patch)
treed3bbe01f62bc3d687ad07df3e9509a3b5c1b2d10 /docs/WritingAnLLVMPass.html
parentce76db9083900d0998fc0a847d215d92b24dba67 (diff)
downloadexternal_llvm-65acb301787c163665df7935d66198b359003959.zip
external_llvm-65acb301787c163665df7935d66198b359003959.tar.gz
external_llvm-65acb301787c163665df7935d66198b359003959.tar.bz2
Fixed the tutorial to indicate that we needed to use the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/WritingAnLLVMPass.html')
-rw-r--r--docs/WritingAnLLVMPass.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/WritingAnLLVMPass.html b/docs/WritingAnLLVMPass.html
index 1bb90f7..1f53f05 100644
--- a/docs/WritingAnLLVMPass.html
+++ b/docs/WritingAnLLVMPass.html
@@ -204,6 +204,14 @@ we are operating on <tt><a
href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Function.html">Function</a></tt>'s.</p>
<p>Next we have:</p>
+<pre>
+<b>using namespace llvm;</b>
+</pre>
+<p>... which is required because the functions from the include files
+live in the llvm namespace.
+</p>
+
+<p>Next we have:</p>
<pre>
<b>namespace</b> {
@@ -259,6 +267,8 @@ depending on what it is to be used for. For "optimizations" we use the
<b>#include</b> "<a href="http://llvm.cs.uiuc.edu/doxygen/Pass_8h-source.html">llvm/Pass.h</a>"
<b>#include</b> "<a href="http://llvm.cs.uiuc.edu/doxygen/Function_8h-source.html">llvm/Function.h</a>"
+<b>using namespace llvm;</b>
+
<b>namespace</b> {
<b>struct Hello</b> : <b>public</b> <a href="#FunctionPass">FunctionPass</a> {
<b>virtual bool</b> <a href="#runOnFunction">runOnFunction</a>(Function &amp;F) {