[cfe-commits] r162393 - /cfe/trunk/lib/Sema/SemaStmtAsm.cpp

Chad Rosier mcrosier at apple.com
Wed Aug 22 14:04:08 PDT 2012


Author: mcrosier
Date: Wed Aug 22 16:04:07 2012
New Revision: 162393

URL: http://llvm.org/viewvc/llvm-project?rev=162393&view=rev
Log:
[ms-inline asm] Add helper function.  No functional change intended.

Modified:
    cfe/trunk/lib/Sema/SemaStmtAsm.cpp

Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAsm.cpp?rev=162393&r1=162392&r2=162393&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Wed Aug 22 16:04:07 2012
@@ -387,6 +387,12 @@
   }
 }
 
+static void buildMSAsmPieces(std::vector<std::string> &AsmStrings,
+                             std::vector<std::vector<StringRef> > &Pieces) {
+  for (unsigned i = 0, e = AsmStrings.size(); i != e; ++i)
+    buildMSAsmPieces(AsmStrings[i], Pieces[i]);
+}
+
 // Build the unmodified MSAsmString.
 static std::string buildMSAsmString(Sema &SemaRef, ArrayRef<Token> AsmToks,
                                     std::vector<std::string> &AsmStrings,
@@ -455,8 +461,7 @@
   std::string AsmString = buildMSAsmString(*this, AsmToks, AsmStrings, AsmTokRanges);
 
   std::vector<std::vector<StringRef> > Pieces(AsmStrings.size());
-  for (unsigned i = 0, e = AsmStrings.size(); i != e; ++i)
-    buildMSAsmPieces(AsmStrings[i], Pieces[i]);
+  buildMSAsmPieces(AsmStrings, Pieces);
 
   bool IsSimple = isSimpleMSAsm(Pieces, Context.getTargetInfo());
 





More information about the cfe-commits mailing list