[llvm-commits] PATCH: new Value::getThruSplat API

Chris Lattner clattner at apple.com
Sat Oct 30 09:54:43 PDT 2010

On Oct 30, 2010, at 9:27 AM, Dan Gohman wrote:

> seems pretty readable.  And it would avoid the double-dyncast issue.  But I'm not attatched.
> Or if you like:
>   if (ConstantInt *CI = C->getAs<ConstantInt>())
> clang uses some idioms like this, for example. *shrug*

How is this different than 

if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) ?

More information about the llvm-commits mailing list