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

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


Author: mcrosier
Date: Wed Aug 22 16:08:06 2012
New Revision: 162394

URL: http://llvm.org/viewvc/llvm-project?rev=162394&view=rev
Log:
[ms-inline asm] Add comments.

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=162394&r1=162393&r2=162394&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Wed Aug 22 16:08:06 2012
@@ -328,6 +328,7 @@
   return Ret;
 }
 
+// getSpelling - Get the spelling of the AsmTok token.
 static StringRef getSpelling(Sema &SemaRef, Token AsmTok) {
   StringRef Asm;
   SmallString<512> TokenBuf;
@@ -338,6 +339,7 @@
   return Asm;
 }
 
+// Determine if we should bail on this MSAsm instruction.
 static bool bailOnMSAsm(std::vector<StringRef> Piece) {
   for (unsigned i = 0, e = Piece.size(); i != e; ++i)
     if (isMSAsmKeyword(Piece[i]))
@@ -345,6 +347,7 @@
   return false;
 }
 
+// Determine if we should bail on this MSAsm block.
 static bool bailOnMSAsm(std::vector<std::vector<StringRef> > Pieces) {
   for (unsigned i = 0, e = Pieces.size(); i != e; ++i)
     if (bailOnMSAsm(Pieces[i]))
@@ -352,6 +355,7 @@
   return false;
 }
 
+// Determine if this is a simple MSAsm instruction.
 static bool isSimpleMSAsm(std::vector<StringRef> &Pieces,
                           const TargetInfo &TI) {
   if (isMSAsmKeyword(Pieces[0]))
@@ -363,6 +367,7 @@
   return true;
 }
 
+// Determine if this is a simple MSAsm block.
 static bool isSimpleMSAsm(std::vector<std::vector<StringRef> > Pieces,
                           const TargetInfo &TI) {
   for (unsigned i = 0, e = Pieces.size(); i != e; ++i)
@@ -371,7 +376,7 @@
   return true;
 }
 
-// Break the AsmSting into pieces.
+// Break the AsmSting into pieces (i.e., mnemonic and operands).
 static void buildMSAsmPieces(StringRef Asm, std::vector<StringRef> &Pieces) {
   std::pair<StringRef,StringRef> Split = Asm.split(' ');
 





More information about the cfe-commits mailing list