Fixed the tutorial to indicate that we needed to use the llvm namespace.
authorJonathan Manton <jmanton@uiuc.edu>
Wed, 30 Jun 2004 18:10:30 +0000 (18:10 +0000)
committerJonathan Manton <jmanton@uiuc.edu>
Wed, 30 Jun 2004 18:10:30 +0000 (18:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14507 91177308-0d34-0410-b5e6-96231b3b80d8

docs/WritingAnLLVMPass.html

index 1bb90f79d53598665d86ceb2fd0075cb70015630..1f53f050bae6af4de36213b356c4aa9c8761fcec 100644 (file)
@@ -203,6 +203,14 @@ href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Pass.html">Pass</a></tt>, and
 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>
@@ -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) {