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.
|
// Incorporate the type of the instruction and all its operands.
|
||||||
incorporateType(I.getType());
|
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::isa<llvm::LoadInst>(&I))
|
||||||
if (llvm::IntegerType *ITy = llvm::dyn_cast<llvm::IntegerType>(I.getType())) {
|
if (llvm::IntegerType *ITy = llvm::dyn_cast<llvm::IntegerType>(I.getType())) {
|
||||||
IntegerTypes.push_back(ITy);
|
IntegerTypes.push_back(ITy);
|
||||||
// llvm::StoreInst St = llvm::dyn_cast<llvm::StoreInst>(I);
|
const llvm::LoadInst *St = llvm::dyn_cast<llvm::LoadInst>(&I);
|
||||||
// IsVolatile.push_back(St.isVolatile());
|
IsVolatile.push_back(St->isVolatile());
|
||||||
// Alignment.push_back(St.getAlignment());
|
Alignment.push_back(St->getAlignment());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (llvm::User::const_op_iterator OI = I.op_begin(), OE = I.op_end();
|
for (llvm::User::const_op_iterator OI = I.op_begin(), OE = I.op_end();
|
||||||
OI != OE; ++OI)
|
OI != OE; ++OI)
|
||||||
incorporateValue(*OI);
|
incorporateValue(*OI);
|
||||||
|
|||||||
Reference in New Issue
Block a user