[ms-inline asm] Simplify logic.  No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162385 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp
index a4a7a41..732688d 100644
--- a/lib/Sema/SemaStmtAsm.cpp
+++ b/lib/Sema/SemaStmtAsm.cpp
@@ -360,7 +360,14 @@
   for (unsigned i = 1, e = Pieces.size(); i != e; ++i)
     if (!TI.isValidGCCRegisterName(Pieces[i]))
       return false;
+  return true;
+}
 
+static bool isSimpleMSAsm(std::vector<std::vector<StringRef> > Pieces,
+                          const TargetInfo &TI) {
+  for (unsigned i = 0, e = Pieces.size(); i != e; ++i)
+    if (!isSimpleMSAsm(Pieces[i], TI))
+      return false;
   return true;
 }
 
@@ -447,12 +454,11 @@
   std::vector<std::vector<StringRef> > Pieces;
   Pieces.resize(NumAsmStrings);
 
-  bool IsSimple = true;
-  for (unsigned i = 0; i != NumAsmStrings; ++i) {
+
+  for (unsigned i = 0; i != NumAsmStrings; ++i)
     buildMSAsmPieces(AsmStrings[i], Pieces[i]);
-    if (IsSimple)
-      IsSimple = isSimpleMSAsm(Pieces[i], Context.getTargetInfo());
-  }
+
+  bool IsSimple = isSimpleMSAsm(Pieces, Context.getTargetInfo());
 
   // AsmParser doesn't fully support these asm statements.
   if (bailOnMSAsm(Pieces)) { DEF_SIMPLE_MSASM; return Owned(NS); }