diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter4/toy.cpp')
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter4/toy.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp index 4d56c0f2dfb..27c3f4f22d6 100644 --- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp @@ -87,17 +87,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; @@ -157,6 +154,7 @@ public: Function *Codegen(); }; +} // end anonymous namespace //===----------------------------------------------------------------------===// // Parser |

