[Mlir-commits] [mlir] e1d6f29 - [mlir][ods] Escape attribute summaries

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Nov 11 17:39:36 PST 2021


Author: Mogball
Date: 2021-11-12T01:39:15Z
New Revision: e1d6f29a1e640e267e1d2b94d0d761e1d15e99bd

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

LOG: [mlir][ods] Escape attribute summaries

Added: 
    

Modified: 
    mlir/tools/mlir-tblgen/CodeGenHelpers.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp b/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp
index e5ac14e8f7a2..11782e4becfa 100644
--- a/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp
+++ b/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp
@@ -195,7 +195,7 @@ void StaticVerifierFunctionEmitter::emitConstraints(
   for (auto &it : constraints) {
     os << formatv(codeTemplate, it.second,
                   tgfmt(it.first.getConditionTemplate(), &ctx),
-                  it.first.getSummary());
+                  escapeString(it.first.getSummary()));
   }
 }
 
@@ -221,13 +221,13 @@ void StaticVerifierFunctionEmitter::emitPatternConstraints() {
   for (auto &it : typeConstraints) {
     os << formatv(patternAttrOrTypeConstraintCode, it.second,
                   tgfmt(it.first.getConditionTemplate(), &ctx),
-                  it.first.getSummary(), "Type type");
+                  escapeString(it.first.getSummary()), "Type type");
   }
   ctx.withSelf("attr");
   for (auto &it : attrConstraints) {
     os << formatv(patternAttrOrTypeConstraintCode, it.second,
                   tgfmt(it.first.getConditionTemplate(), &ctx),
-                  it.first.getSummary(), "Attribute attr");
+                  escapeString(it.first.getSummary()), "Attribute attr");
   }
 }
 


        


More information about the Mlir-commits mailing list