don't make _Bool be a keyword in -fms-extensions mode, patch by

Steven Watanabe!

llvm-svn: 104373
This commit is contained in:
Chris Lattner 2010-05-21 20:22:37 +00:00
parent 7d7f604321
commit c425fe4c80
2 changed files with 4 additions and 2 deletions

View File

@ -220,7 +220,7 @@ KEYWORD(unsigned , KEYALL)
KEYWORD(void , KEYALL)
KEYWORD(volatile , KEYALL)
KEYWORD(while , KEYALL)
KEYWORD(_Bool , KEYALL)
KEYWORD(_Bool , KEYNOMS)
KEYWORD(_Complex , KEYALL)
KEYWORD(_Imaginary , KEYALL)
KEYWORD(__func__ , KEYALL)

View File

@ -70,7 +70,8 @@ namespace {
KEYGNU = 16,
KEYMS = 32,
BOOLSUPPORT = 64,
KEYALTIVEC = 128
KEYALTIVEC = 128,
KEYNOMS = 256
};
}
@ -94,6 +95,7 @@ static void AddKeyword(llvm::StringRef Keyword,
else if (LangOpts.Microsoft && (Flags & KEYMS)) AddResult = 1;
else if (LangOpts.Bool && (Flags & BOOLSUPPORT)) AddResult = 2;
else if (LangOpts.AltiVec && (Flags & KEYALTIVEC)) AddResult = 2;
else if (!LangOpts.Microsoft && (Flags & KEYNOMS)) AddResult = 2;
// Don't add this keyword if disabled in this language.
if (AddResult == 0) return;