Fix for cast
This commit is contained in:
15
cbackend.cpp
15
cbackend.cpp
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user