[Mlir-commits] [mlir] a883714 - [mlir] better formatting in interface docs

Alex Zinenko llvmlistbot at llvm.org
Mon Mar 15 03:12:14 PDT 2021


Author: Alex Zinenko
Date: 2021-03-15T11:10:32+01:00
New Revision: a88371490dae07450169bfc759efa6e443624d4a

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

LOG: [mlir] better formatting in interface docs

Start the description from a new line instead of putting the first
paragraph in the section header. Wrap the class name in backticks to
make it clear that it relates to the code.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp b/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
index 77de47d8516c..2f8f22ca3f22 100644
--- a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
@@ -381,7 +381,8 @@ static void emitInterfaceDoc(const llvm::Record &interfaceDef,
   Interface interface(&interfaceDef);
 
   // Emit the interface name followed by the description.
-  os << "## " << interface.getName() << " (" << interfaceDef.getName() << ")";
+  os << "## " << interface.getName() << " (`" << interfaceDef.getName()
+     << "`)\n\n";
   if (auto description = interface.getDescription())
     mlir::tblgen::emitDescription(*description, os);
 


        


More information about the Mlir-commits mailing list