[weak vtables] Remove a bunch of weak vtables
[oota-llvm.git] / examples / Kaleidoscope / Chapter6 / toy.cpp
index 4d6a128cba242908680bd87987f88a4f4f37c203..70f233bf487407c9dffcde66516934c45b6d2bb9 100644 (file)
@@ -105,10 +105,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;