diff options
author | David Peixotto <dpeixott@codeaurora.org> | 2014-01-15 22:40:02 +0000 |
---|---|---|
committer | David Peixotto <dpeixott@codeaurora.org> | 2014-01-15 22:40:02 +0000 |
commit | a034c96443006487a566d960d5e14f6f1c4cdf7c (patch) | |
tree | 9f6f88330ff7a92ccdaa524bb7c0cf430a70b510 /include/llvm/MC/MCParser | |
parent | 4c831d97bf065ae5d0fcba80b28e8396dfda7f39 (diff) | |
download | llvm-a034c96443006487a566d960d5e14f6f1c4cdf7c.tar.gz llvm-a034c96443006487a566d960d5e14f6f1c4cdf7c.tar.bz2 llvm-a034c96443006487a566d960d5e14f6f1c4cdf7c.tar.xz |
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
Diffstat (limited to 'include/llvm/MC/MCParser')
-rw-r--r-- | include/llvm/MC/MCParser/AsmLexer.h | 1 | ||||
-rw-r--r-- | include/llvm/MC/MCParser/MCAsmLexer.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/MC/MCParser/AsmLexer.h b/include/llvm/MC/MCParser/AsmLexer.h index a97b450a46..1b3ab57751 100644 --- a/include/llvm/MC/MCParser/AsmLexer.h +++ b/include/llvm/MC/MCParser/AsmLexer.h @@ -30,7 +30,6 @@ class AsmLexer : public MCAsmLexer { const char *CurPtr; const MemoryBuffer *CurBuf; bool isAtStartOfLine; - bool AllowAtInIdentifier; // Cached here to avoid repeated MAI query. void operator=(const AsmLexer&) LLVM_DELETED_FUNCTION; AsmLexer(const AsmLexer&) LLVM_DELETED_FUNCTION; diff --git a/include/llvm/MC/MCParser/MCAsmLexer.h b/include/llvm/MC/MCParser/MCAsmLexer.h index 53b380f12f..8edf3a4423 100644 --- a/include/llvm/MC/MCParser/MCAsmLexer.h +++ b/include/llvm/MC/MCParser/MCAsmLexer.h @@ -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 |