[Mlir-commits] [mlir] c74150e - [mlir][ODS][NFC] Mark OpaqueType as a buildable type.

River Riddle llvmlistbot at llvm.org
Thu Feb 13 00:04:09 PST 2020


Author: River Riddle
Date: 2020-02-12T23:51:38-08:00
New Revision: c74150e75f69de88bb18b0ed636465db1bae23b4

URL: https://github.com/llvm/llvm-project/commit/c74150e75f69de88bb18b0ed636465db1bae23b4
DIFF: https://github.com/llvm/llvm-project/commit/c74150e75f69de88bb18b0ed636465db1bae23b4.diff

LOG: [mlir][ODS][NFC] Mark OpaqueType as a buildable type.

This allows for using it in the declarative assembly form, among other
things.

Added: 
    

Modified: 
    mlir/include/mlir/IR/OpBase.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td
index d73b7ba9bb71..1ee7a25811c0 100644
--- a/mlir/include/mlir/IR/OpBase.td
+++ b/mlir/include/mlir/IR/OpBase.td
@@ -371,7 +371,9 @@ def AnyComplex : Type<CPred<"$_self.isa<ComplexType>()">, "complex-type">;
 
 class OpaqueType<string dialect, string name, string description>
   : Type<CPred<"isOpaqueTypeWithName($_self, \""#dialect#"\", \""#name#"\")">,
-         description>;
+         description>,
+    BuildableType<"OpaqueType::get($_builder.getIdentifier(\"" # dialect #
+                  "\"), \"" # name # "\", $_builder.getContext())">;
 
 // Function Type
 


        


More information about the Mlir-commits mailing list