[mlir] Add a TypeAttr class, allow type attributes

PiperOrigin-RevId: 207235956
diff --git a/lib/IR/Builders.cpp b/lib/IR/Builders.cpp
index 199f35d..715e460 100644
--- a/lib/IR/Builders.cpp
+++ b/lib/IR/Builders.cpp
@@ -100,6 +100,10 @@
   return AffineMapAttr::get(value, context);
 }
 
+TypeAttr *Builder::getTypeAttr(Type *type) {
+  return TypeAttr::get(type, context);
+}
+
 //===----------------------------------------------------------------------===//
 // Affine Expressions and Affine Map.
 //===----------------------------------------------------------------------===//