[Mlir-commits] [mlir] 0235e3c - [mlir][NFC] Fully qualify default value of Attributes `getStorageType()` in files generated by mlir-tblgen

Markus Böck llvmlistbot at llvm.org
Sat Aug 28 06:38:02 PDT 2021


Author: Markus Böck
Date: 2021-08-28T15:37:56+02:00
New Revision: 0235e3c7a6d711d5c1a12c8e7686245bf142627a

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

LOG: [mlir][NFC] Fully qualify default value of Attributes `getStorageType()` in files generated by mlir-tblgen

Added: 
    

Modified: 
    mlir/include/mlir/TableGen/Attribute.h
    mlir/lib/TableGen/Attribute.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/TableGen/Attribute.h b/mlir/include/mlir/TableGen/Attribute.h
index a8292a982320d..579b93846b1c1 100644
--- a/mlir/include/mlir/TableGen/Attribute.h
+++ b/mlir/include/mlir/TableGen/Attribute.h
@@ -50,7 +50,7 @@ class Attribute : public AttrConstraint {
   explicit Attribute(const llvm::DefInit *init);
 
   // Returns the storage type if set. Returns the default storage type
-  // ("Attribute") otherwise.
+  // ("::mlir::Attribute") otherwise.
   StringRef getStorageType() const;
 
   // Returns the return type for this attribute.

diff  --git a/mlir/lib/TableGen/Attribute.cpp b/mlir/lib/TableGen/Attribute.cpp
index 3b949b0460bef..9664eb91b2351 100644
--- a/mlir/lib/TableGen/Attribute.cpp
+++ b/mlir/lib/TableGen/Attribute.cpp
@@ -65,7 +65,7 @@ StringRef Attribute::getStorageType() const {
   const auto *init = def->getValueInit("storageType");
   auto type = getValueAsString(init);
   if (type.empty())
-    return "Attribute";
+    return "::mlir::Attribute";
   return type;
 }
 


        


More information about the Mlir-commits mailing list