1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[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:
Arthur Eubanks 2020-10-21 08:55:50 -07:00
parent db27c6942b
commit 4381b544ab

View File

@ -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).