mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Fix parsing of .symver directive on ARM
ARM assembly syntax uses @ for a comment, execpt for the second parameter of the .symver directive which requires @ as part of the symbol name. This commit fixes the parsing of this directive by adding a special case for ARM for this one argumnet. To make the change we had to move the AllowAtInIdentifier variable to the MCAsmLexer interface (from AsmLexer) and expose a setter for the value. The ELFAsmParser then toggles this value when parsing the second argument to the .symver directive for a target that uses @ as a comment symbol git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199339 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -118,6 +118,7 @@ class MCAsmLexer {
|
||||
protected: // Can only create subclasses.
|
||||
const char *TokStart;
|
||||
bool SkipSpace;
|
||||
bool AllowAtInIdentifier;
|
||||
|
||||
MCAsmLexer();
|
||||
|
||||
@@ -170,6 +171,9 @@ public:
|
||||
|
||||
/// setSkipSpace - Set whether spaces should be ignored by the lexer
|
||||
void setSkipSpace(bool val) { SkipSpace = val; }
|
||||
|
||||
bool getAllowAtInIdentifier() { return AllowAtInIdentifier; }
|
||||
void setAllowAtInIdentifier(bool v) { AllowAtInIdentifier = v; }
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
Reference in New Issue
Block a user