summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM64/AsmParser
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-29 07:58:25 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-29 07:58:25 +0000
commitf85b7fc1971dde03d4582f9c31d00bf297458159 (patch)
treeaa3743f347f14a983341c7f55c710398a6a284ad /llvm/lib/Target/ARM64/AsmParser
parent906c2cd2e67d5462d0eabf3e19fb42849b67be05 (diff)
downloadbcm5719-llvm-f85b7fc1971dde03d4582f9c31d00bf297458159.tar.gz
bcm5719-llvm-f85b7fc1971dde03d4582f9c31d00bf297458159.zip
[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. ARM64 edition
llvm-svn: 207509
Diffstat (limited to 'llvm/lib/Target/ARM64/AsmParser')
-rw-r--r--llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
index 71cf100daf9..0c7dd73ed3d 100644
--- a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
+++ b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
@@ -77,7 +77,8 @@ private:
bool validateInstruction(MCInst &Inst, SmallVectorImpl<SMLoc> &Loc);
bool MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
OperandVector &Operands, MCStreamer &Out,
- unsigned &ErrorInfo, bool MatchingInlineAsm);
+ unsigned &ErrorInfo,
+ bool MatchingInlineAsm) override;
/// @name Auto-generated Match Functions
/// {
@@ -113,11 +114,12 @@ public:
setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
}
- virtual bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
- SMLoc NameLoc, OperandVector &Operands);
- virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc);
- virtual bool ParseDirective(AsmToken DirectiveID);
- unsigned validateTargetOperandClass(MCParsedAsmOperand *Op, unsigned Kind);
+ bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
+ SMLoc NameLoc, OperandVector &Operands) override;
+ bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) override;
+ bool ParseDirective(AsmToken DirectiveID) override;
+ unsigned validateTargetOperandClass(MCParsedAsmOperand *Op,
+ unsigned Kind) override;
static bool classifySymbolRef(const MCExpr *Expr,
ARM64MCExpr::VariantKind &ELFRefKind,
@@ -293,9 +295,9 @@ public:
}
/// getStartLoc - Get the location of the first token of this operand.
- SMLoc getStartLoc() const { return StartLoc; }
+ SMLoc getStartLoc() const override { return StartLoc; }
/// getEndLoc - Get the location of the last token of this operand.
- SMLoc getEndLoc() const { return EndLoc; }
+ SMLoc getEndLoc() const override { return EndLoc; }
/// getOffsetLoc - Get the location of the offset of this memory operand.
SMLoc getOffsetLoc() const { return OffsetLoc; }
@@ -324,7 +326,7 @@ public:
return Barrier.Val;
}
- unsigned getReg() const {
+ unsigned getReg() const override {
assert(Kind == k_Register && "Invalid access!");
return Reg.RegNum;
}
@@ -369,7 +371,7 @@ public:
return Extend.Val;
}
- bool isImm() const { return Kind == k_Immediate; }
+ bool isImm() const override { return Kind == k_Immediate; }
bool isSImm9() const {
if (!isImm())
return false;
@@ -686,7 +688,7 @@ public:
return IsKnownRegister;
}
- bool isReg() const { return Kind == k_Register && !Reg.isVector; }
+ bool isReg() const override { return Kind == k_Register && !Reg.isVector; }
bool isVectorReg() const { return Kind == k_Register && Reg.isVector; }
bool isVectorRegLo() const {
return Kind == k_Register && Reg.isVector &&
@@ -723,11 +725,11 @@ public:
bool isVectorIndexD() const {
return Kind == k_VectorIndex && VectorIndex.Val < 2;
}
- bool isToken() const { return Kind == k_Token; }
+ bool isToken() const override { return Kind == k_Token; }
bool isTokenEqual(StringRef Str) const {
return Kind == k_Token && getToken() == Str;
}
- bool isMem() const { return Kind == k_Memory; }
+ bool isMem() const override { return Kind == k_Memory; }
bool isSysCR() const { return Kind == k_SysCR; }
bool isPrefetch() const { return Kind == k_Prefetch; }
bool isShifter() const { return Kind == k_Shifter; }
@@ -1594,7 +1596,7 @@ public:
addMemoryWritebackIndexedOperands(Inst, N, 16);
}
- virtual void print(raw_ostream &OS) const;
+ void print(raw_ostream &OS) const override;
static ARM64Operand *CreateToken(StringRef Str, bool IsSuffix, SMLoc S,
MCContext &Ctx) {
OpenPOWER on IntegriCloud