Fix for cast

This commit is contained in:
Vsevolod Livinskiy
2015-02-13 21:39:18 +03:00
parent 1abce94803
commit 8090285d42

View File

@@ -185,13 +185,22 @@ namespace {
// Incorporate the type of the instruction and all its operands.
incorporateType(I.getType());
if (llvm::isa<llvm::StoreInst>(&I))
if (llvm::IntegerType *ITy = llvm::dyn_cast<llvm::IntegerType>(I.getType())) {
IntegerTypes.push_back(ITy);
const llvm::StoreInst *St = llvm::dyn_cast<llvm::StoreInst>(&I);
IsVolatile.push_back(St->isVolatile());
Alignment.push_back(St->getAlignment());
}
if (llvm::isa<llvm::LoadInst>(&I))
if (llvm::IntegerType *ITy = llvm::dyn_cast<llvm::IntegerType>(I.getType())) {
IntegerTypes.push_back(ITy);
// llvm::StoreInst St = llvm::dyn_cast<llvm::StoreInst>(I);
// IsVolatile.push_back(St.isVolatile());
// Alignment.push_back(St.getAlignment());
const llvm::LoadInst *St = llvm::dyn_cast<llvm::LoadInst>(&I);
IsVolatile.push_back(St->isVolatile());
Alignment.push_back(St->getAlignment());
}
for (llvm::User::const_op_iterator OI = I.op_begin(), OE = I.op_end();
OI != OE; ++OI)
incorporateValue(*OI);