diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-02 00:13:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-02 00:13:03 +0000 |
commit | 38fd96731c2e2da872ff5c9a7c71869b5219eaad (patch) | |
tree | e3d8fb1e701eb389faf7500577c4a32bc20cf200 /utils/TableGen | |
parent | 3bd19d753baf13577a43e0375bd7283379ad914a (diff) | |
download | external_llvm-38fd96731c2e2da872ff5c9a7c71869b5219eaad.zip external_llvm-38fd96731c2e2da872ff5c9a7c71869b5219eaad.tar.gz external_llvm-38fd96731c2e2da872ff5c9a7c71869b5219eaad.tar.bz2 |
add some missing \n's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/DAGISelMatcherEmitter.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index f9383d0..fe92689 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -329,9 +329,12 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, << 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 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, 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 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, 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 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, 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. |