Implement call and call_indirect ops.

This also fixes an infinite recursion in VariadicOperands that this turned up.

PiperOrigin-RevId: 209692932
diff --git a/lib/IR/AsmPrinter.cpp b/lib/IR/AsmPrinter.cpp
index 6bcaad4..cd90e3e 100644
--- a/lib/IR/AsmPrinter.cpp
+++ b/lib/IR/AsmPrinter.cpp
@@ -247,6 +247,7 @@
   }
 
   void print(const Module *module);
+  void printFunctionReference(const Function *func);
   void printAttribute(const Attribute *attr);
   void printType(const Type *type);
   void print(const Function *fn);
@@ -387,6 +388,10 @@
   }
 }
 
+void ModulePrinter::printFunctionReference(const Function *func) {
+  os << '@' << func->getName();
+}
+
 void ModulePrinter::printAttribute(const Attribute *attr) {
   switch (attr->getKind()) {
   case Attribute::Kind::Bool:
@@ -420,7 +425,8 @@
     if (!function) {
       os << "<<FUNCTION ATTR FOR DELETED FUNCTION>>";
     } else {
-      os << '@' << function->getName() << " : ";
+      printFunctionReference(function);
+      os << " : ";
       printType(function->getType());
     }
     break;
@@ -768,6 +774,9 @@
   void printAffineExpr(const AffineExpr *expr) {
     return ModulePrinter::printAffineExpr(expr);
   }
+  void printFunctionReference(const Function *func) {
+    return ModulePrinter::printFunctionReference(func);
+  }
 
   void printOperand(const SSAValue *value) { printValueID(value); }