summaryrefslogtreecommitdiffstats
path: root/examples/Kaleidoscope/Chapter3/toy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Kaleidoscope/Chapter3/toy.cpp')
-rw-r--r--examples/Kaleidoscope/Chapter3/toy.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/Kaleidoscope/Chapter3/toy.cpp b/examples/Kaleidoscope/Chapter3/toy.cpp
index 0fb64e3..2494345 100644
--- a/examples/Kaleidoscope/Chapter3/toy.cpp
+++ b/examples/Kaleidoscope/Chapter3/toy.cpp
@@ -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;