diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-08-22 21:08:06 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-08-22 21:08:06 +0000 |
commit | 53d79d9905bcbf27e8e11cbddeb56c1ed4696339 (patch) | |
tree | 38a3bd6338173c76a8f8626e6b818a1aed25eefa /clang/lib/Sema/SemaStmtAsm.cpp | |
parent | bb365caf80361502f13427de03189ffdba020e1b (diff) | |
download | bcm5719-llvm-53d79d9905bcbf27e8e11cbddeb56c1ed4696339.tar.gz bcm5719-llvm-53d79d9905bcbf27e8e11cbddeb56c1ed4696339.zip |
[ms-inline asm] Add comments.
llvm-svn: 162394
Diffstat (limited to 'clang/lib/Sema/SemaStmtAsm.cpp')
-rw-r--r-- | clang/lib/Sema/SemaStmtAsm.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp index f83a5a69127..0827e3d1bc9 100644 --- a/clang/lib/Sema/SemaStmtAsm.cpp +++ b/clang/lib/Sema/SemaStmtAsm.cpp @@ -328,6 +328,7 @@ static bool isMSAsmKeyword(StringRef Name) { 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 @@ static StringRef getSpelling(Sema &SemaRef, Token AsmTok) { 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 @@ static bool bailOnMSAsm(std::vector<StringRef> Piece) { 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 @@ static bool bailOnMSAsm(std::vector<std::vector<StringRef> > Pieces) { 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 @@ static bool isSimpleMSAsm(std::vector<StringRef> &Pieces, 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 @@ static bool isSimpleMSAsm(std::vector<std::vector<StringRef> > Pieces, 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(' '); |