[llvm] 5f15c17 - [llvm][Docs] `_or_null` -> `_if_present` in Programmer's Manual (#98586)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 01:46:10 PDT 2024


Author: Yanzuo Liu
Date: 2024-08-15T09:46:07+01:00
New Revision: 5f15c1776a462940464743dbc9e82c46fe7e14aa

URL: https://github.com/llvm/llvm-project/commit/5f15c1776a462940464743dbc9e82c46fe7e14aa
DIFF: https://github.com/llvm/llvm-project/commit/5f15c1776a462940464743dbc9e82c46fe7e14aa.diff

LOG: [llvm][Docs] `_or_null` -> `_if_present` in Programmer's Manual (#98586)

`cast_or_null` is deprecated.

https://github.com/llvm/llvm-project/blob/062844615db5e141da118c1ad780bf102537f40a/llvm/include/llvm/Support/Casting.h#L717-L722

Added: 
    

Modified: 
    llvm/docs/ProgrammersManual.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index 231de56ef4cfe..41d1388e5bf7e 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -164,20 +164,20 @@ rarely have to include this file directly).
   efficient to use the ``InstVisitor`` class to dispatch over the instruction
   type directly.
 
-``isa_and_nonnull<>``:
-  The ``isa_and_nonnull<>`` operator works just like the ``isa<>`` operator,
+``isa_and_present<>``:
+  The ``isa_and_present<>`` operator works just like the ``isa<>`` operator,
   except that it allows for a null pointer as an argument (which it then
   returns false).  This can sometimes be useful, allowing you to combine several
   null checks into one.
 
-``cast_or_null<>``:
-  The ``cast_or_null<>`` operator works just like the ``cast<>`` operator,
+``cast_if_present<>``:
+  The ``cast_if_present<>`` operator works just like the ``cast<>`` operator,
   except that it allows for a null pointer as an argument (which it then
   propagates).  This can sometimes be useful, allowing you to combine several
   null checks into one.
 
-``dyn_cast_or_null<>``:
-  The ``dyn_cast_or_null<>`` operator works just like the ``dyn_cast<>``
+``dyn_cast_if_present<>``:
+  The ``dyn_cast_if_present<>`` operator works just like the ``dyn_cast<>``
   operator, except that it allows for a null pointer as an argument (which it
   then propagates).  This can sometimes be useful, allowing you to combine
   several null checks into one.


        


More information about the llvm-commits mailing list