mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Use dyn_cast<> instead of isa<> and cast<>
llvm-svn: 217796
This commit is contained in:
parent
64e655bce4
commit
c293d239a5
@ -365,7 +365,8 @@ bool CallInst::paramHasAttr(unsigned i, Attribute::AttrKind A) const {
|
||||
/// IsConstantOne - Return true only if val is constant int 1
|
||||
static bool IsConstantOne(Value *val) {
|
||||
assert(val && "IsConstantOne does not work with NULL val");
|
||||
return isa<ConstantInt>(val) && cast<ConstantInt>(val)->isOne();
|
||||
const ConstantInt *CVal = dyn_cast<ConstantInt>(val);
|
||||
return CVal && CVal->isOne();
|
||||
}
|
||||
|
||||
static Instruction *createMalloc(Instruction *InsertBefore,
|
||||
|
Loading…
x
Reference in New Issue
Block a user