[weak vtables] Remove a bunch of weak vtables
[oota-llvm.git] / examples / Kaleidoscope / Chapter3 / toy.cpp
index 0fb64e3a54dc71554e034d63f320528e6e24399b..2494345c3f174b8ac0b963849fe7eea8e531e18f 100644 (file)
@@ -84,10 +84,13 @@ static int gettok() {
 /// ExprAST - Base class for all expression nodes.
 class ExprAST {
 public:
-  virtual ~ExprAST() {}
+  virtual ~ExprAST();
   virtual Value *Codegen() = 0;
 };
 
+// Provide out-of-line definition to prevent weak vtable.
+ExprAST::~ExprAST() {}
+
 /// NumberExprAST - Expression class for numeric literals like "1.0".
 class NumberExprAST : public ExprAST {
   double Val;