OSDN Git Service

reduce indentation with early-out
authorChris Lattner <sabre@nondot.org>
Mon, 6 Apr 2009 21:34:58 +0000 (21:34 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Apr 2009 21:34:58 +0000 (21:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68462 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Bitcode/BitstreamReader.h

index 48eaa36..182ef39 100644 (file)
@@ -342,20 +342,20 @@ private:
     if (Op.isLiteral()) {
       // If the abbrev specifies the literal value to use, use it.
       Vals.push_back(Op.getLiteralValue());
-    } else {
-      // Decode the value as we are commanded.
-      switch (Op.getEncoding()) {
-      default: assert(0 && "Unknown encoding!");
-      case BitCodeAbbrevOp::Fixed:
-        Vals.push_back(Read((unsigned)Op.getEncodingData()));
-        break;
-      case BitCodeAbbrevOp::VBR:
-        Vals.push_back(ReadVBR64((unsigned)Op.getEncodingData()));
-        break;
-      case BitCodeAbbrevOp::Char6:
-        Vals.push_back(BitCodeAbbrevOp::DecodeChar6(Read(6)));
-        break;
-      }
+      return;
+    }
+    // Decode the value as we are commanded.
+    switch (Op.getEncoding()) {
+    default: assert(0 && "Unknown encoding!");
+    case BitCodeAbbrevOp::Fixed:
+      Vals.push_back(Read((unsigned)Op.getEncodingData()));
+      break;
+    case BitCodeAbbrevOp::VBR:
+      Vals.push_back(ReadVBR64((unsigned)Op.getEncodingData()));
+      break;
+    case BitCodeAbbrevOp::Char6:
+      Vals.push_back(BitCodeAbbrevOp::DecodeChar6(Read(6)));
+      break;
     }
   }
 public: