diff options
author | Eli Bendersky <eliben@google.com> | 2013-01-12 00:05:00 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-01-12 00:05:00 +0000 |
commit | bf706b3f9987a88493dea4f206f46e8062eedd0b (patch) | |
tree | dac13965b6a0c1dbcce3c8751eb2bee1ff95f584 /lib/MC/MCParser/AsmParser.cpp | |
parent | dcf669560e2ae00c5392474d10aa758a51c609a8 (diff) |
Make ParseIdentifier a public method instead of private.
The MCAsmParser interface defines ParseIdentifier is public. There's no reason
whatsoever for AsmParser (which implements the MCAsmParser interface) to hide
this method.
This is all part of a bigger scheme. Several asm parsing "extensions" use the
main parser properly through the MCAsmParser interface. However,
GenericAsmParser has much more exclusive access and uses implementation details
from the concrete implementation - AsmParser, in which it is also declared as
a friend. This makes for overly coupled code, and even makes it hard to split
GenericAsmParser into a separate file. There's no reason why GenericAsmParser
shouldn't be able to access AsmParser through an abstract interface, as long
as it's actually registered as an extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index bc3a366162..2aecb0cdb7 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -226,6 +226,10 @@ public: virtual bool ParseParenExpression(const MCExpr *&Res, SMLoc &EndLoc); virtual bool ParseAbsoluteExpression(int64_t &Res); + /// ParseIdentifier - Parse an identifier or string (as a quoted identifier) + /// and set \p Res to the identifier contents. + virtual bool ParseIdentifier(StringRef &Res); + /// } private: @@ -286,10 +290,6 @@ private: bool ParseParenExpr(const MCExpr *&Res, SMLoc &EndLoc); bool ParseBracketExpr(const MCExpr *&Res, SMLoc &EndLoc); - /// ParseIdentifier - Parse an identifier or string (as a quoted identifier) - /// and set \p Res to the identifier contents. - virtual bool ParseIdentifier(StringRef &Res); - // Directive Parsing. enum DirectiveKind { |