diff --git a/lib/Target/Sparc/PreSelection.cpp b/lib/Target/Sparc/PreSelection.cpp index d4f4398b4a3..044caa7d317 100644 --- a/lib/Target/Sparc/PreSelection.cpp +++ b/lib/Target/Sparc/PreSelection.cpp @@ -222,7 +222,7 @@ void PreSelection::visitPHINode(PHINode &PN) { // so just handle PHIs and other instructions separately. // for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) - visitOneOperand(I, PN.getIncomingValue(i), + visitOneOperand(PN, PN.getIncomingValue(i), PN.getOperandNumForIncomingValue(i), *PN.getIncomingBlock(i)->getTerminator()); // do not call visitOperands! diff --git a/lib/Target/Sparc/SparcInstrInfo.cpp b/lib/Target/Sparc/SparcInstrInfo.cpp index 2d872314e9a..952b7d2fcb4 100644 --- a/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/lib/Target/Sparc/SparcInstrInfo.cpp @@ -19,6 +19,7 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/Function.h" #include "llvm/Constants.h" +#include "llvm/iTerminators.h" #include "llvm/DerivedTypes.h" static const uint32_t MAXLO = (1 << 10) - 1; // set bits set by %lo(*)