mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Use the do-while(0) thing for this #define.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
933b851485
commit
ae510f3936
@ -436,9 +436,11 @@ lltok::Kind LLLexer::LexIdentifier() {
|
||||
CurPtr = KeywordEnd;
|
||||
--StartChar;
|
||||
unsigned Len = CurPtr-StartChar;
|
||||
#define KEYWORD(STR) \
|
||||
if (Len == strlen(#STR) && !memcmp(StartChar, #STR, strlen(#STR))) \
|
||||
return lltok::kw_##STR;
|
||||
#define KEYWORD(STR) \
|
||||
do { \
|
||||
if (Len == strlen(#STR) && !memcmp(StartChar, #STR, strlen(#STR))) \
|
||||
return lltok::kw_##STR; \
|
||||
} while (0)
|
||||
|
||||
KEYWORD(true); KEYWORD(false);
|
||||
KEYWORD(declare); KEYWORD(define);
|
||||
@ -490,11 +492,11 @@ lltok::Kind LLLexer::LexIdentifier() {
|
||||
KEYWORD(seq_cst);
|
||||
KEYWORD(singlethread);
|
||||
|
||||
KEYWORD(nnan)
|
||||
KEYWORD(ninf)
|
||||
KEYWORD(nsz)
|
||||
KEYWORD(arcp)
|
||||
KEYWORD(fast)
|
||||
KEYWORD(nnan);
|
||||
KEYWORD(ninf);
|
||||
KEYWORD(nsz);
|
||||
KEYWORD(arcp);
|
||||
KEYWORD(fast);
|
||||
KEYWORD(nuw);
|
||||
KEYWORD(nsw);
|
||||
KEYWORD(exact);
|
||||
|
Loading…
Reference in New Issue
Block a user