Fix some issues where we weren't printing affine map references symbolically.
Two problems: 1) we didn't visit the types in ops correctly, and 2) the
general "T" version of the OpAsmPrinter inserter would match things like
MemRefType& and print it directly.

PiperOrigin-RevId: 206863642
diff --git a/lib/IR/AsmPrinter.cpp b/lib/IR/AsmPrinter.cpp
index 0bc573b..99fb1df 100644
--- a/lib/IR/AsmPrinter.cpp
+++ b/lib/IR/AsmPrinter.cpp
@@ -118,9 +118,15 @@
 }
 
 void ModuleState::visitOperation(const Operation *op) {
-  for (auto elt : op->getAttrs()) {
+  // Visit all the types used in the operation.
+  for (auto *operand : op->getOperands())
+    visitType(operand->getType());
+  for (auto *result : op->getResults())
+    visitType(result->getType());
+
+  // Visit each of the attributes.
+  for (auto elt : op->getAttrs())
     visitAttribute(elt.second);
-  }
 }
 
 void ModuleState::visitExtFunction(const ExtFunction *fn) {