Fix clang warning "has virtual functions but non-virtual destructor".
BUG= None
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/1741733003 .
diff --git a/src/IceAssembler.h b/src/IceAssembler.h
index 6e5ed15..57c9493 100644
--- a/src/IceAssembler.h
+++ b/src/IceAssembler.h
@@ -46,7 +46,7 @@
public:
Label() = default;
- ~Label() = default;
+ virtual ~Label() = default;
virtual void finalCheck() const {
// Assert if label is being destroyed with unresolved branches pending.
diff --git a/src/IceFixups.h b/src/IceFixups.h
index fb8a164..1a29a18 100644
--- a/src/IceFixups.h
+++ b/src/IceFixups.h
@@ -31,6 +31,7 @@
public:
AssemblerFixup() = default;
AssemblerFixup(const AssemblerFixup &) = default;
+ virtual ~AssemblerFixup() = default;
intptr_t position() const {
assert(position_was_set_);
return position_;
diff --git a/src/IceInst.h b/src/IceInst.h
index 9daf8e2..6c62d0b 100644
--- a/src/IceInst.h
+++ b/src/IceInst.h
@@ -165,7 +165,7 @@
void dumpDest(const Cfg *Func) const;
virtual bool isRedundantAssign() const { return false; }
- ~Inst() = default;
+ virtual ~Inst() = default;
protected:
Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest);
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 443e2d0..f3a66fc 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -91,7 +91,7 @@
}
/// @}
- ~Operand() = default;
+ virtual ~Operand() = default;
protected:
Operand(OperandKind Kind, Type Ty) : Ty(Ty), Kind(Kind) {