Remove unnecessary #include "llvm/LLVMContext.h".
[oota-llvm.git] / lib / Transforms / Utils / AddrModeMatcher.cpp
index bcfa2303a8c640e8f01e1b81c5dd10af50bd80c7..135a621f5d96a0a03632c42e6bbd703d3ad3e76c 100644 (file)
@@ -55,7 +55,7 @@ void ExtAddrMode::print(raw_ostream &OS) const {
 
 void ExtAddrMode::dump() const {
   print(errs());
-  cerr << '\n';
+  errs() << '\n';
 }
 
 
@@ -97,8 +97,7 @@ bool AddressingModeMatcher::MatchScaledValue(Value *ScaleReg, int64_t Scale,
   // X*Scale + C*Scale to addr mode.
   ConstantInt *CI = 0; Value *AddLHS = 0;
   if (isa<Instruction>(ScaleReg) &&  // not a constant expr.
-      match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI)),
-            MemoryInst->getContext())) {
+      match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI)))) {
     TestAddrMode.ScaledReg = AddLHS;
     TestAddrMode.BaseOffs += CI->getSExtValue()*TestAddrMode.Scale;