mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Use dyn_cast<> instead of isa<> and cast<>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217796 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b01c85b421
commit
744742602a
@ -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…
Reference in New Issue
Block a user