OSDN Git Service

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 1bb90f7..1f53f05 100644 (file)
@@ -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) {