From 345d16ddcc688e06428708780e9b1499f9aec0a8 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 29 Aug 2012 05:48:09 +0000 Subject: [PATCH] Add virtual keywords for methods that override the base class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162826 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCParser/AsmParser.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 240c10b5470..d60a2701907 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -133,13 +133,13 @@ private: public: AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out, const MCAsmInfo &MAI); - ~AsmParser(); + virtual ~AsmParser(); virtual bool Run(bool NoInitialTextSection, bool NoFinalize = false); - void AddDirectiveHandler(MCAsmParserExtension *Object, - StringRef Directive, - DirectiveHandler Handler) { + virtual void AddDirectiveHandler(MCAsmParserExtension *Object, + StringRef Directive, + DirectiveHandler Handler) { DirectiveMap[Directive] = std::make_pair(Object, Handler); } @@ -166,7 +166,7 @@ public: virtual bool Error(SMLoc L, const Twine &Msg, ArrayRef Ranges = ArrayRef()); - const AsmToken &Lex(); + virtual const AsmToken &Lex(); bool ParseExpression(const MCExpr *&Res); virtual bool ParseExpression(const MCExpr *&Res, SMLoc &EndLoc); @@ -207,7 +207,7 @@ private: /// subsequently. void JumpToLoc(SMLoc Loc); - void EatToEndOfStatement(); + virtual void EatToEndOfStatement(); bool ParseMacroArgument(MacroArgument &MA); bool ParseMacroArguments(const Macro *M, MacroArguments &A); @@ -215,7 +215,7 @@ private: /// \brief Parse up to the end of statement and a return the contents from the /// current token until the end of the statement; the current token on exit /// will be either the EndOfStatement or EOF. - StringRef ParseStringToEndOfStatement(); + virtual StringRef ParseStringToEndOfStatement(); /// \brief Parse until the end of a statement or a comma is encountered, /// return the contents from the current token up to the end or comma. @@ -230,7 +230,7 @@ private: /// ParseIdentifier - Parse an identifier or string (as a quoted identifier) /// and set \arg Res to the identifier contents. - bool ParseIdentifier(StringRef &Res); + virtual bool ParseIdentifier(StringRef &Res); // Directive Parsing. -- 2.34.1