@@ -115,7 +115,9 @@ rarely have to include this file directly).
115115 The ``isa<> `` operator works exactly like the Java "``instanceof ``" operator.
116116 It returns true or false depending on whether a reference or pointer points to
117117 an instance of the specified class. This can be very useful for constraint
118- checking of various sorts (example below).
118+ checking of various sorts (example below). It's a variadic operator, so you
119+ can specify more than one class to check if the reference or pointer points
120+ to an instance of one of the classes specified.
119121
120122``cast<> ``:
121123 The ``cast<> `` operator is a "checked cast" operation. It converts a pointer
@@ -131,7 +133,11 @@ rarely have to include this file directly).
131133 if (isa<Constant>(V) || isa<Argument>(V) || isa<GlobalValue>(V))
132134 return true;
133135
134- // Otherwise, it must be an instruction...
136+ // Alternate, more compact form.
137+ if (isa<Constant, Argument, GlobalValue>(V))
138+ return true;
139+
140+ // Otherwise, it must be an instruction.
135141 return !L->contains(cast<Instruction>(V)->getParent());
136142 }
137143
@@ -168,7 +174,8 @@ rarely have to include this file directly).
168174 The ``isa_and_present<> `` operator works just like the ``isa<> `` operator,
169175 except that it allows for a null pointer as an argument (which it then
170176 returns false). This can sometimes be useful, allowing you to combine several
171- null checks into one.
177+ null checks into one. Similar to ``isa<> `` operator, you can specify more than
178+ one classes to check.
172179
173180``cast_if_present<> ``:
174181 The ``cast_if_present<> `` operator works just like the ``cast<> `` operator,
0 commit comments