mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
[C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203342 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad1b194773
commit
5dc48d726d
@ -131,11 +131,11 @@ class DisasmMemoryObject : public MemoryObject {
|
||||
public:
|
||||
DisasmMemoryObject(uint8_t *bytes, uint64_t size, uint64_t basePC) :
|
||||
Bytes(bytes), Size(size), BasePC(basePC) {}
|
||||
|
||||
uint64_t getBase() const { return BasePC; }
|
||||
uint64_t getExtent() const { return Size; }
|
||||
|
||||
int readByte(uint64_t Addr, uint8_t *Byte) const {
|
||||
uint64_t getBase() const override { return BasePC; }
|
||||
uint64_t getExtent() const override { return Size; }
|
||||
|
||||
int readByte(uint64_t Addr, uint8_t *Byte) const override {
|
||||
if (Addr - BasePC >= Size)
|
||||
return -1;
|
||||
*Byte = Bytes[Addr - BasePC];
|
||||
|
@ -190,10 +190,10 @@ public:
|
||||
const MCAsmInfo &MAI);
|
||||
virtual ~AsmParser();
|
||||
|
||||
virtual bool Run(bool NoInitialTextSection, bool NoFinalize = false);
|
||||
bool Run(bool NoInitialTextSection, bool NoFinalize = false) override;
|
||||
|
||||
virtual void addDirectiveHandler(StringRef Directive,
|
||||
ExtensionDirectiveHandler Handler) {
|
||||
void addDirectiveHandler(StringRef Directive,
|
||||
ExtensionDirectiveHandler Handler) override {
|
||||
ExtensionDirectiveMap[Directive] = Handler;
|
||||
}
|
||||
|
||||
@ -201,52 +201,52 @@ public:
|
||||
/// @name MCAsmParser Interface
|
||||
/// {
|
||||
|
||||
virtual SourceMgr &getSourceManager() { return SrcMgr; }
|
||||
virtual MCAsmLexer &getLexer() { return Lexer; }
|
||||
virtual MCContext &getContext() { return Ctx; }
|
||||
virtual MCStreamer &getStreamer() { return Out; }
|
||||
virtual unsigned getAssemblerDialect() {
|
||||
SourceMgr &getSourceManager() override { return SrcMgr; }
|
||||
MCAsmLexer &getLexer() override { return Lexer; }
|
||||
MCContext &getContext() override { return Ctx; }
|
||||
MCStreamer &getStreamer() override { return Out; }
|
||||
unsigned getAssemblerDialect() override {
|
||||
if (AssemblerDialect == ~0U)
|
||||
return MAI.getAssemblerDialect();
|
||||
else
|
||||
return AssemblerDialect;
|
||||
}
|
||||
virtual void setAssemblerDialect(unsigned i) {
|
||||
void setAssemblerDialect(unsigned i) override {
|
||||
AssemblerDialect = i;
|
||||
}
|
||||
|
||||
virtual void Note(SMLoc L, const Twine &Msg, ArrayRef<SMRange> Ranges = None);
|
||||
virtual bool Warning(SMLoc L, const Twine &Msg,
|
||||
ArrayRef<SMRange> Ranges = None);
|
||||
virtual bool Error(SMLoc L, const Twine &Msg,
|
||||
ArrayRef<SMRange> Ranges = None);
|
||||
void Note(SMLoc L, const Twine &Msg,
|
||||
ArrayRef<SMRange> Ranges = None) override;
|
||||
bool Warning(SMLoc L, const Twine &Msg,
|
||||
ArrayRef<SMRange> Ranges = None) override;
|
||||
bool Error(SMLoc L, const Twine &Msg,
|
||||
ArrayRef<SMRange> Ranges = None) override;
|
||||
|
||||
virtual const AsmToken &Lex();
|
||||
const AsmToken &Lex() override;
|
||||
|
||||
void setParsingInlineAsm(bool V) { ParsingInlineAsm = V; }
|
||||
bool isParsingInlineAsm() { return ParsingInlineAsm; }
|
||||
void setParsingInlineAsm(bool V) override { ParsingInlineAsm = V; }
|
||||
bool isParsingInlineAsm() override { return ParsingInlineAsm; }
|
||||
|
||||
bool parseMSInlineAsm(void *AsmLoc, std::string &AsmString,
|
||||
unsigned &NumOutputs, unsigned &NumInputs,
|
||||
SmallVectorImpl<std::pair<void *,bool> > &OpDecls,
|
||||
SmallVectorImpl<std::string> &Constraints,
|
||||
SmallVectorImpl<std::string> &Clobbers,
|
||||
const MCInstrInfo *MII,
|
||||
const MCInstPrinter *IP,
|
||||
MCAsmParserSemaCallback &SI);
|
||||
const MCInstrInfo *MII, const MCInstPrinter *IP,
|
||||
MCAsmParserSemaCallback &SI) override;
|
||||
|
||||
bool parseExpression(const MCExpr *&Res);
|
||||
virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc);
|
||||
virtual bool parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc);
|
||||
virtual bool parseParenExpression(const MCExpr *&Res, SMLoc &EndLoc);
|
||||
virtual bool parseAbsoluteExpression(int64_t &Res);
|
||||
bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc) override;
|
||||
bool parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) override;
|
||||
bool parseParenExpression(const MCExpr *&Res, SMLoc &EndLoc) override;
|
||||
bool parseAbsoluteExpression(int64_t &Res) override;
|
||||
|
||||
/// \brief Parse an identifier or string (as a quoted identifier)
|
||||
/// and set \p Res to the identifier contents.
|
||||
virtual bool parseIdentifier(StringRef &Res);
|
||||
virtual void eatToEndOfStatement();
|
||||
bool parseIdentifier(StringRef &Res) override;
|
||||
void eatToEndOfStatement() override;
|
||||
|
||||
virtual void checkForValidSection();
|
||||
void checkForValidSection() override;
|
||||
/// }
|
||||
|
||||
private:
|
||||
@ -322,7 +322,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.
|
||||
virtual StringRef parseStringToEndOfStatement();
|
||||
StringRef parseStringToEndOfStatement() override;
|
||||
|
||||
/// \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.
|
||||
@ -451,7 +451,7 @@ private:
|
||||
bool parseDirectiveElseIf(SMLoc DirectiveLoc); // ".elseif"
|
||||
bool parseDirectiveElse(SMLoc DirectiveLoc); // ".else"
|
||||
bool parseDirectiveEndIf(SMLoc DirectiveLoc); // .endif
|
||||
virtual bool parseEscapedString(std::string &Data);
|
||||
bool parseEscapedString(std::string &Data) override;
|
||||
|
||||
const MCExpr *applyModifierToExpr(const MCExpr *E,
|
||||
MCSymbolRefExpr::VariantKind Variant);
|
||||
|
@ -42,7 +42,7 @@ class COFFAsmParser : public MCAsmParserExtension {
|
||||
bool ParseSectionName(StringRef &SectionName);
|
||||
bool ParseSectionFlags(StringRef FlagsString, unsigned* Flags);
|
||||
|
||||
virtual void Initialize(MCAsmParser &Parser) {
|
||||
void Initialize(MCAsmParser &Parser) override {
|
||||
// Call the base implementation.
|
||||
MCAsmParserExtension::Initialize(Parser);
|
||||
|
||||
|
@ -40,7 +40,7 @@ class DarwinAsmParser : public MCAsmParserExtension {
|
||||
public:
|
||||
DarwinAsmParser() {}
|
||||
|
||||
virtual void Initialize(MCAsmParser &Parser) {
|
||||
void Initialize(MCAsmParser &Parser) override {
|
||||
// Call the base implementation.
|
||||
this->MCAsmParserExtension::Initialize(Parser);
|
||||
|
||||
|
@ -37,7 +37,7 @@ class ELFAsmParser : public MCAsmParserExtension {
|
||||
public:
|
||||
ELFAsmParser() { BracketExpressionsSupported = true; }
|
||||
|
||||
virtual void Initialize(MCAsmParser &Parser) {
|
||||
void Initialize(MCAsmParser &Parser) override {
|
||||
// Call the base implementation.
|
||||
this->MCAsmParserExtension::Initialize(Parser);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user