[llvm] r249980 - [TableGen] Add a space between type and '*' in front of a variable name in output file. While there replace type with 'auto' since there's a cast on the right side of the assignment. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 09:59:29 PDT 2015


Author: ctopper
Date: Sun Oct 11 11:59:29 2015
New Revision: 249980

URL: http://llvm.org/viewvc/llvm-project?rev=249980&view=rev
Log:
[TableGen] Add a space between type and '*' in front of a variable name in output file. While there replace type with 'auto' since there's a cast on the right side of the assignment. NFC

Modified:
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=249980&r1=249979&r2=249980&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Sun Oct 11 11:59:29 2015
@@ -771,7 +771,7 @@ std::string TreePredicateFn::getCodeToRu
   if (ClassName == "SDNode")
     Result = "    SDNode *N = Node;\n";
   else
-    Result = "    " + ClassName + "*N = cast<" + ClassName + ">(Node);\n";
+    Result = "    auto *N = cast<" + ClassName + ">(Node);\n";
   
   return Result + getPredCode();
 }




More information about the llvm-commits mailing list