[PATCH] D140163: [docs] Update docs since getBasicBlockList() is now private

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 21:45:47 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG12c55eb66de0: [docs] Update docs since getBasicBlockList() is now private (authored by vporpo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140163/new/

https://reviews.llvm.org/D140163

Files:
  llvm/docs/ProgrammersManual.rst
  llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst


Index: llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
===================================================================
--- llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
+++ llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
@@ -377,7 +377,7 @@
 .. 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-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");
Index: llvm/docs/ProgrammersManual.rst
===================================================================
--- llvm/docs/ProgrammersManual.rst
+++ llvm/docs/ProgrammersManual.rst
@@ -3882,17 +3882,12 @@
 
 * | ``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()``


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140163.483430.patch
Type: text/x-patch
Size: 1898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221216/2577843b/attachment.bin>


More information about the llvm-commits mailing list