.. contents::
:local:
-Written by `Chris Lattner <mailto:sabre@nondot.org>`_ and
-`Jim Laskey <mailto:jlaskey@mac.com>`_
-
Introduction --- What is a pass?
================================
.. 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
.. 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;
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