Merge alignment of common GlobalValue.
[oota-llvm.git] / docs / WritingAnLLVMPass.rst
index b10d98f87e2ba1599d91445d0b4187f838e2637a..cfbda042cc53cf357448d8095849f8a1a5e2dce1 100644 (file)
@@ -96,7 +96,7 @@ Start out with:
 .. code-block:: c++
 
   #include "llvm/Pass.h"
 .. 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
   #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 {
 
 
   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
 <writing-an-llvm-pass-FunctionPass>`.  The different builtin pass subclasses
 are described in detail :ref:`later <writing-an-llvm-pass-pass-classes>`, but
 for now, know that ``FunctionPass`` operates on a function at a time.
 <writing-an-llvm-pass-FunctionPass>`.  The different builtin pass subclasses
 are described in detail :ref:`later <writing-an-llvm-pass-pass-classes>`, 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"
 .. 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;
     #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
       -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
   ...
 
 The pass name gets added as the information string for your pass, giving some
@@ -454,7 +453,7 @@ external functions.
 
 To be explicit, ``FunctionPass`` subclasses are not allowed to:
 
 
 To be explicit, ``FunctionPass`` subclasses are not allowed to:
 
-#. Modify a ``Function`` other than the one currently being processed.
+#. Inspect or modify a ``Function`` other than the one currently being processed.
 #. Add or remove ``Function``\ s from the current ``Module``.
 #. Add or remove global variables from the current ``Module``.
 #. Maintain state across invocations of:ref:`runOnFunction
 #. Add or remove ``Function``\ s from the current ``Module``.
 #. Add or remove global variables from the current ``Module``.
 #. Maintain state across invocations of:ref:`runOnFunction