[llvm] 12c55eb - [docs] Update docs since getBasicBlockList() is now private
Vasileios Porpodas via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 21:45:44 PST 2022
Author: Vasileios Porpodas
Date: 2022-12-15T21:41:24-08:00
New Revision: 12c55eb66de0e12243ebe6e66e5b5bf787d30ca3
URL: https://github.com/llvm/llvm-project/commit/12c55eb66de0e12243ebe6e66e5b5bf787d30ca3
DIFF: https://github.com/llvm/llvm-project/commit/12c55eb66de0e12243ebe6e66e5b5bf787d30ca3.diff
LOG: [docs] Update docs since getBasicBlockList() is now private
Differential Revision: https://reviews.llvm.org/D140163
Added:
Modified:
llvm/docs/ProgrammersManual.rst
llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
Removed:
################################################################################
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index 868e6851944b1..d1b3744e22da0 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -3882,17 +3882,12 @@ Important Public Members of the ``Function``
* | ``Function::iterator`` - Typedef for basic block list iterator
| ``Function::const_iterator`` - Typedef for const_iterator.
- | ``begin()``, ``end()``, ``size()``, ``empty()``
+ | ``begin()``, ``end()``, ``size()``, ``empty()``, ``insert()``,
+ ``splice()``, ``erase()``
These are forwarding methods that make it easy to access the contents of a
``Function`` object's BasicBlock_ list.
-* ``Function::BasicBlockListType &getBasicBlockList()``
-
- Returns the list of BasicBlock_\ s. This is necessary to use when you need to
- update the list or perform a complex action that doesn't have a forwarding
- method.
-
* | ``Function::arg_iterator`` - Typedef for the argument list iterator
| ``Function::const_arg_iterator`` - Typedef for const_iterator.
| ``arg_begin()``, ``arg_end()``, ``arg_size()``, ``arg_empty()``
diff --git a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
index b517844ba77c5..c5fb35d92ac5a 100644
--- a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
+++ b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
@@ -377,7 +377,7 @@ value for code that will set up the Phi node.
.. code-block:: c++
// Emit else block.
- TheFunction->getBasicBlockList().push_back(ElseBB);
+ TheFunction->insert(TheFunction->end(), ElseBB);
Builder.SetInsertPoint(ElseBB);
Value *ElseV = Else->codegen();
@@ -398,7 +398,7 @@ code:
.. code-block:: c++
// Emit merge block.
- TheFunction->getBasicBlockList().push_back(MergeBB);
+ TheFunction->insert(TheFunction->end(), MergeBB);
Builder.SetInsertPoint(MergeBB);
PHINode *PN =
Builder.CreatePHI(Type::getDoubleTy(TheContext), 2, "iftmp");
More information about the llvm-commits
mailing list