From 5f15c1776a462940464743dbc9e82c46fe7e14aa Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Thu, 15 Aug 2024 16:46:07 +0800 Subject: [PATCH] [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 --- llvm/docs/ProgrammersManual.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst index 231de56ef4cfee..41d1388e5bf7e9 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.