X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FWritingAnLLVMPass.rst;h=cfbda042cc53cf357448d8095849f8a1a5e2dce1;hb=4d97a1a559452358bca063a53454ce743495a680;hp=e7a87a12d25101f629ea87abb71382ca121901bf;hpb=905dea95bf909c294728c9b407ea0e9f854cdbe4;p=oota-llvm.git diff --git a/docs/WritingAnLLVMPass.rst b/docs/WritingAnLLVMPass.rst index e7a87a12d25..cfbda042cc5 100644 --- a/docs/WritingAnLLVMPass.rst +++ b/docs/WritingAnLLVMPass.rst @@ -96,7 +96,7 @@ Start out with: .. code-block:: c++ #include "llvm/Pass.h" - #include "llvm/Function.h" + #include "llvm/IR/Function.h" #include "llvm/Support/raw_ostream.h" Which are needed because we are writing a `Pass @@ -131,7 +131,7 @@ Next, we declare our pass itself: struct Hello : public FunctionPass { -This declares a "``Hello``" class that is a subclass of `FunctionPass +This declares a "``Hello``" class that is a subclass of :ref:`FunctionPass `. The different builtin pass subclasses are described in detail :ref:`later `, but for now, know that ``FunctionPass`` operates on a function at a time. @@ -184,7 +184,7 @@ As a whole, the ``.cpp`` file looks like: .. code-block:: c++ #include "llvm/Pass.h" - #include "llvm/Function.h" + #include "llvm/IR/Function.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -259,7 +259,6 @@ To see what happened to the other string you registered, try running -hello - Hello World Pass -indvars - Induction Variable Simplification -inline - Function Integration/Inlining - -insert-edge-profiling - Insert instrumentation for edge profiling ... The pass name gets added as the information string for your pass, giving some