diff options
Diffstat (limited to 'examples/Kaleidoscope/Chapter4/toy.cpp')
-rw-r--r-- | examples/Kaleidoscope/Chapter4/toy.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/Kaleidoscope/Chapter4/toy.cpp b/examples/Kaleidoscope/Chapter4/toy.cpp index 0e41cc1..4d56c0f 100644 --- a/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/examples/Kaleidoscope/Chapter4/toy.cpp @@ -91,10 +91,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; |