diff options
Diffstat (limited to 'examples/Kaleidoscope/Chapter6')
-rw-r--r-- | examples/Kaleidoscope/Chapter6/toy.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/Kaleidoscope/Chapter6/toy.cpp b/examples/Kaleidoscope/Chapter6/toy.cpp index 70f233b..b7b347d 100644 --- a/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/examples/Kaleidoscope/Chapter6/toy.cpp @@ -101,17 +101,14 @@ static int gettok() { //===----------------------------------------------------------------------===// // Abstract Syntax Tree (aka Parse Tree) //===----------------------------------------------------------------------===// - +namespace { /// 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; @@ -214,6 +211,7 @@ public: Function *Codegen(); }; +} // end anonymous namespace //===----------------------------------------------------------------------===// // Parser |