From 355d06974a86bcc11797316393b9752ae5d14e61 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 29 Nov 2014 16:05:27 +0000 Subject: [PATCH] Remove 'else' after 'return'. Fix formatting of a 'switch' statement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222955 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/TGParser.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 8f83714d32e..8761726d12e 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -2330,25 +2330,24 @@ bool TGParser::ParseMultiClass() { if (Lex.getCode() != tgtok::l_brace) { if (!inherits) return TokError("expected '{' in multiclass definition"); - else if (Lex.getCode() != tgtok::semi) + if (Lex.getCode() != tgtok::semi) return TokError("expected ';' in multiclass definition"); - else - Lex.Lex(); // eat the ';'. + Lex.Lex(); // eat the ';'. } else { if (Lex.Lex() == tgtok::r_brace) // eat the '{'. return TokError("multiclass must contain at least one def"); while (Lex.getCode() != tgtok::r_brace) { switch (Lex.getCode()) { - default: - return TokError("expected 'let', 'def' or 'defm' in multiclass body"); - case tgtok::Let: - case tgtok::Def: - case tgtok::Defm: - case tgtok::Foreach: - if (ParseObject(CurMultiClass)) - return true; - break; + default: + return TokError("expected 'let', 'def' or 'defm' in multiclass body"); + case tgtok::Let: + case tgtok::Def: + case tgtok::Defm: + case tgtok::Foreach: + if (ParseObject(CurMultiClass)) + return true; + break; } } Lex.Lex(); // eat the '}'.