search for: lexidentifi

Displaying 5 results from an estimated 5 matches for "lexidentifi".

Did you mean: lexidentifier
2007 Dec 15
2
[LLVMdev] fix warning with newer g++ compilers
...+ ++CurLineNo; return '\n'; - } + } } int LLLexer::LexToken() { TokStart = CurPtr; - + int CurChar = getNextChar(); - + switch (CurChar) { default: // Handle letters: [a-zA-Z_] if (isalpha(CurChar) || CurChar == '_') return LexIdentifier(); - + return CurChar; case EOF: return YYEOF; case 0: @@ -234,7 +234,7 @@ int LLLexer::LexToken() { return LexToken(); case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case ...
2014 Nov 12
2
[LLVMdev] Increase the flexibility of the AsmLexer in parsing identifiers.
...oment the default AsmLexer lexes tokens like this: There are a bunch of symbols that are parsed directly into tokens(like #, % ... etc), then there are integer/float literals and a fairly big category that catches the default case that doesn't match any of the previous, that are handled by the LexIdentifier() function. Actually in the current default AsmLexer this function doesn't always emit an Identifier token, but might return Float literals or Dot tokens in some special cases, so it works more like a "handle what I couldn't directly recognize" kind of function. In multiple oc...
2012 May 23
0
[LLVMdev] Assembly macros instantiation problem
...outine implementation was borrowed from lib/MC/MCParser/AsmLexer.cpp): =================================================================== --- lib/MC/MCParser/AsmParser.cpp (revision 157279) +++ lib/MC/MCParser/AsmParser.cpp (working copy) @@ -1436,6 +1436,11 @@ NewDiag.print(0, OS); } +/// LexIdentifier: [a-zA-Z_.][a-zA-Z0-9_$.@]* +static bool IsIdentifierChar(char c) { + return isalnum(c) || c == '_' || c == '$' || c == '.' || c == '@'; +} + bool AsmParser::expandMacro(SmallString<256> &Buf, StringRef Body, const std::vect...
2016 Jul 20
2
[XRay] Build instrumented Clang, some analysis results
...PS5_S9_ 91536 clang::DeclContext::lookup(clang::DeclarationName) const 84122 clang::TypeLoc::getNextTypeLocImpl(clang::TypeLoc) 81368 clang::TypeLoc::getLocalSourceRangeImpl(clang::TypeLoc) 80626 clang::FunctionDecl::getCanonicalDecl() 79489 clang::TagDecl::getDefinition() const 77347 clang::Lexer::LexIdentifier(clang::Token&, char const*) - The top few slowest (filtered by hand, because, see caveats below): 1. main 2. clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) 3. clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, std::all...
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...d for loads / stores /// from the global. virtual unsigned getMaximalGlobalOffset() const { diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp index 6523bce..939dc5d 100644 --- a/lib/AsmParser/LLLexer.cpp +++ b/lib/AsmParser/LLLexer.cpp @@ -636,6 +636,7 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(ssp); KEYWORD(sspreq); KEYWORD(sspstrong); + KEYWORD(safestack); KEYWORD(sanitize_address); KEYWORD(sanitize_thread); KEYWORD(sanitize_memory); diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index b7818bb..0a655a6 100644 --- a/lib/AsmParser/LLP...