case ';':
SkipLineComment();
return LexToken();
- case '!': return LexMetadata();
+ case '!': return LexExclaim();
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case '-':
return false;
}
-/// LexMetadata:
-/// !{...}
-/// !42
+/// LexExclaim:
/// !foo
-lltok::Kind LLLexer::LexMetadata() {
+/// !
+lltok::Kind LLLexer::LexExclaim() {
+ // Lex a metadata name as a MetadataVar.
if (isalpha(CurPtr[0])) {
++CurPtr;
while (isalnum(CurPtr[0]) || CurPtr[0] == '-' || CurPtr[0] == '$' ||
++CurPtr;
StrVal.assign(TokStart+1, CurPtr); // Skip !
- return lltok::NamedOrCustomMD;
+ return lltok::MetadataVar;
}
- return lltok::Metadata;
+ return lltok::exclaim;
}
/// LexIdentifier: Handle several related productions:
KEYWORD(private);
KEYWORD(linker_private);
+ KEYWORD(linker_private_weak);
+ KEYWORD(linker_private_weak_def_auto);
KEYWORD(internal);
KEYWORD(available_externally);
KEYWORD(linkonce);
KEYWORD(coldcc);
KEYWORD(x86_stdcallcc);
KEYWORD(x86_fastcallcc);
+ KEYWORD(x86_thiscallcc);
KEYWORD(arm_apcscc);
KEYWORD(arm_aapcscc);
KEYWORD(arm_aapcs_vfpcc);