[LLVMdev] description of llvm::cast correct?
clattner at apple.com
Fri Apr 8 19:38:17 PDT 2011
On Apr 7, 2011, at 6:02 AM, Jochen Wilhelmy wrote:
> in the description of llvm::cast it says:
> But it will correctly return NULL when the input is NULL.
> And in the description of llvm::cast_or_null it says:
> Functionally identical to cast, except that a null value is accepted
> This sounds to me as if both functions accept a null pointer.
> What is then the difference between cast and cast_or_null?
Yep, you're right, this is a comment bug. cast<> does not allow nulls. Fixed in r129186.
More information about the llvm-dev