[PM/AA] Hoist the value handle definition for CFLAA into the header to
[oota-llvm.git] / lib / Analysis / MemDerefPrinter.cpp
index b0194d33d0e83e34e1dad045c3753d1cb1a7d46b..ef2de41e120921a5eeaf50681e659d3b0bbda8ff 100644 (file)
@@ -37,7 +37,7 @@ namespace {
       Vec.clear();
     }
   };
-} // namespace
+}
 
 char MemDerefPrinter::ID = 0;
 INITIALIZE_PASS_BEGIN(MemDerefPrinter, "print-memderefs",
@@ -51,7 +51,7 @@ FunctionPass *llvm::createMemDerefPrinter() {
 
 bool MemDerefPrinter::runOnFunction(Function &F) {
   const DataLayout &DL = F.getParent()->getDataLayout();
-  for (auto &I: inst_range(F)) {
+  for (auto &I: instructions(F)) {
     if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
       Value *PO = LI->getPointerOperand();
       if (isDereferenceablePointer(PO, DL))