mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Change Constant::getNullConstant to Constant::getNullValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2323 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -115,7 +115,7 @@ InductionVariable::InductionVariable(PHINode *P, cfg::LoopInfo *LoopInfo) {
|
||||
Step = 0;
|
||||
|
||||
if (V2 == Phi) { // referencing the PHI directly? Must have zero step
|
||||
Step = Constant::getNullConstant(Phi->getType());
|
||||
Step = Constant::getNullValue(Phi->getType());
|
||||
} else if (BinaryOperator *I = dyn_cast<BinaryOperator>(V2)) {
|
||||
// TODO: This could be much better...
|
||||
if (I->getOpcode() == Instruction::Add) {
|
||||
@@ -143,7 +143,7 @@ InductionVariable::InductionVariable(PHINode *P, cfg::LoopInfo *LoopInfo) {
|
||||
if (StepE.Offset)
|
||||
Step = (Value*)StepE.Offset;
|
||||
else
|
||||
Step = Constant::getNullConstant(Step->getType());
|
||||
Step = Constant::getNullValue(Step->getType());
|
||||
const Type *ETy = Phi->getType();
|
||||
if (ETy->isPointerType()) ETy = Type::ULongTy;
|
||||
Step = (Value*)(StepE.Offset ? StepE.Offset : ConstantInt::get(ETy,0));
|
||||
|
Reference in New Issue
Block a user