forked from OSchip/llvm-project
[Docs] Clarify that FunctionPasses can't add/remove declarations
In preparation for potential future concurrency, a FunctionPass shouldn't modify anything at the module level that other FunctionPasses can also modify. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D89890
This commit is contained in:
parent
efe62b637d
commit
710676cf3a
|
@ -474,7 +474,8 @@ external functions.
|
|||
To be explicit, ``FunctionPass`` subclasses are not allowed to:
|
||||
|
||||
#. Inspect or modify a ``Function`` other than the one currently being processed.
|
||||
#. Add or remove ``Function``\ s from the current ``Module``.
|
||||
#. Add or remove ``Function``\ s from the current ``Module``, including
|
||||
declarations.
|
||||
#. Add or remove global variables from the current ``Module``.
|
||||
#. Maintain state across invocations of :ref:`runOnFunction
|
||||
<writing-an-llvm-pass-runOnFunction>` (including global data).
|
||||
|
|
Loading…
Reference in New Issue