Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: src/IceOperand.h

Issue 605123002: Subzero: Use 'override' as appropriate for C++11. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceOperand.h
diff --git a/src/IceOperand.h b/src/IceOperand.h
index f233bec6020ce00981af0f5ecab0cc596b395d0f..c0f699f526d644571324444c1ddd45958945b7d4 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -102,9 +102,9 @@ class Constant : public Operand {
public:
uint32_t getPoolEntryID() const { return PoolEntryID; }
using Operand::dump;
- virtual void emit(const Cfg *Func) const { emit(Func->getContext()); }
+ void emit(const Cfg *Func) const override { emit(Func->getContext()); }
virtual void emit(GlobalContext *Ctx) const = 0;
- virtual void dump(const Cfg *Func, Ostream &Str) const = 0;
+ void dump(const Cfg *Func, Ostream &Str) const = 0;
static bool classof(const Operand *Operand) {
OperandKind Kind = Operand->getKind();
@@ -117,7 +117,7 @@ protected:
Vars = NULL;
NumVars = 0;
}
- virtual ~Constant() {}
+ ~Constant() override {}
// PoolEntryID is an integer that uniquely identifies the constant
// within its constant pool. It is used for building the constant
// pool in the object code and for referencing its entries.
@@ -141,9 +141,9 @@ public:
using Constant::emit;
// The target needs to implement this for each ConstantPrimitive
// specialization.
- virtual void emit(GlobalContext *Ctx) const;
+ void emit(GlobalContext *Ctx) const override;
using Constant::dump;
- virtual void dump(const Cfg *, Ostream &Str) const { Str << getValue(); }
+ void dump(const Cfg *, Ostream &Str) const override { Str << getValue(); }
static bool classof(const Operand *Operand) {
return Operand->getKind() == K;
@@ -154,7 +154,7 @@ private:
: Constant(K, Ty, PoolEntryID), Value(Value) {}
ConstantPrimitive(const ConstantPrimitive &) LLVM_DELETED_FUNCTION;
ConstantPrimitive &operator=(const ConstantPrimitive &) LLVM_DELETED_FUNCTION;
- virtual ~ConstantPrimitive() {}
+ ~ConstantPrimitive() override {}
const T Value;
};
@@ -213,8 +213,8 @@ public:
bool getSuppressMangling() const { return SuppressMangling; }
using Constant::emit;
using Constant::dump;
- virtual void emit(GlobalContext *Ctx) const;
- virtual void dump(const Cfg *Func, Ostream &Str) const;
+ void emit(GlobalContext *Ctx) const override;
+ void dump(const Cfg *Func, Ostream &Str) const override;
static bool classof(const Operand *Operand) {
OperandKind Kind = Operand->getKind();
@@ -229,7 +229,7 @@ private:
ConstantRelocatable(const ConstantRelocatable &) LLVM_DELETED_FUNCTION;
ConstantRelocatable &
operator=(const ConstantRelocatable &) LLVM_DELETED_FUNCTION;
- virtual ~ConstantRelocatable() {}
+ ~ConstantRelocatable() override {}
const int64_t Offset; // fixed offset to add
const IceString Name; // optional for debug/dump
bool SuppressMangling;
@@ -248,8 +248,8 @@ public:
using Constant::emit;
using Constant::dump;
// The target needs to implement this.
- virtual void emit(GlobalContext *Ctx) const;
- virtual void dump(const Cfg *, Ostream &Str) const { Str << "undef"; }
+ void emit(GlobalContext *Ctx) const override;
+ void dump(const Cfg *, Ostream &Str) const override { Str << "undef"; }
static bool classof(const Operand *Operand) {
return Operand->getKind() == kConstUndef;
@@ -260,7 +260,7 @@ private:
: Constant(kConstUndef, Ty, PoolEntryID) {}
ConstantUndef(const ConstantUndef &) LLVM_DELETED_FUNCTION;
ConstantUndef &operator=(const ConstantUndef &) LLVM_DELETED_FUNCTION;
- virtual ~ConstantUndef() {}
+ ~ConstantUndef() override {}
};
// RegWeight is a wrapper for a uint32_t weight value, with a
@@ -415,9 +415,9 @@ public:
// VarsReal.
Variable asType(Type Ty);
- virtual void emit(const Cfg *Func) const;
+ void emit(const Cfg *Func) const override;
using Operand::dump;
- virtual void dump(const Cfg *Func, Ostream &Str) const;
+ void dump(const Cfg *Func, Ostream &Str) const override;
static bool classof(const Operand *Operand) {
OperandKind Kind = Operand->getKind();
@@ -425,7 +425,7 @@ public:
}
// The destructor is public because of the asType() method.
- virtual ~Variable() {}
+ ~Variable() override {}
protected:
Variable(OperandKind K, Type Ty, SizeT Index, const IceString &Name)
« src/IceInst.h ('K') | « src/IceInstX8632.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698