[llvm-commits] [llvm] r97527 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp

Chris Lattner sabre at nondot.org
Mon Mar 1 16:13:03 PST 2010


Author: lattner
Date: Mon Mar  1 18:13:03 2010
New Revision: 97527

URL: http://llvm.org/viewvc/llvm-project?rev=97527&view=rev
Log:
add some missing \n's

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

Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97527&r1=97526&r2=97527&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar  1 18:13:03 2010
@@ -329,9 +329,12 @@
        << getEnumName(cast<CheckChildTypeMatcher>(N)->getType()) << ",\n";
     return 2;
       
-  case Matcher::CheckInteger:
+  case Matcher::CheckInteger: {
     OS << "OPC_CheckInteger, ";
-    return 1+EmitVBRValue(cast<CheckIntegerMatcher>(N)->getValue(), OS);
+    unsigned Bytes=1+EmitVBRValue(cast<CheckIntegerMatcher>(N)->getValue(), OS);
+    OS << '\n';
+    return Bytes;
+  }
   case Matcher::CheckCondCode:
     OS << "OPC_CheckCondCode, ISD::"
        << cast<CheckCondCodeMatcher>(N)->getCondCodeName() << ",\n";
@@ -356,13 +359,19 @@
     return 2;
   }
       
-  case Matcher::CheckAndImm:
+  case Matcher::CheckAndImm: {
     OS << "OPC_CheckAndImm, ";
-    return 1+EmitVBRValue(cast<CheckAndImmMatcher>(N)->getValue(), OS);
+    unsigned Bytes=1+EmitVBRValue(cast<CheckAndImmMatcher>(N)->getValue(), OS);
+    OS << '\n';
+    return Bytes;
+  }
 
-  case Matcher::CheckOrImm:
+  case Matcher::CheckOrImm: {
     OS << "OPC_CheckOrImm, ";
-    return 1+EmitVBRValue(cast<CheckOrImmMatcher>(N)->getValue(), OS);
+    unsigned Bytes = 1+EmitVBRValue(cast<CheckOrImmMatcher>(N)->getValue(), OS);
+    OS << '\n';
+    return Bytes;
+  }
       
   case Matcher::CheckFoldableChainNode:
     OS << "OPC_CheckFoldableChainNode,\n";
@@ -376,7 +385,9 @@
     int64_t Val = cast<EmitIntegerMatcher>(N)->getValue();
     OS << "OPC_EmitInteger, "
        << getEnumName(cast<EmitIntegerMatcher>(N)->getVT()) << ", ";
-    return 2+EmitVBRValue(Val, OS);
+    unsigned Bytes = 2+EmitVBRValue(Val, OS);
+    OS << '\n';
+    return Bytes;
   }
   case Matcher::EmitStringInteger: {
     const std::string &Val = cast<EmitStringIntegerMatcher>(N)->getValue();
@@ -456,11 +467,8 @@
       OS << "/*#Ops*/";
     OS << ", ";
     unsigned NumOperandBytes = 0;
-    for (unsigned i = 0, e = EN->getNumOperands(); i != e; ++i) {
-      // We emit the operand numbers in VBR encoded format, in case the number
-      // is too large to represent with a byte.
+    for (unsigned i = 0, e = EN->getNumOperands(); i != e; ++i)
       NumOperandBytes += EmitVBRValue(EN->getOperand(i), OS);
-    }
     
     if (!OmitComments) {
       // Print the result #'s for EmitNode.





More information about the llvm-commits mailing list