summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Chapter2/toy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter2/toy.cpp')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter2/toy.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp
index bab34adefde..8357c5b63fb 100644
--- a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp
@@ -1,4 +1,5 @@
#include "llvm/ADT/STLExtras.h"
+#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
@@ -82,11 +83,13 @@ static int gettok() {
//===----------------------------------------------------------------------===//
// Abstract Syntax Tree (aka Parse Tree)
//===----------------------------------------------------------------------===//
+
namespace {
+
/// ExprAST - Base class for all expression nodes.
class ExprAST {
public:
- virtual ~ExprAST() {}
+ virtual ~ExprAST() = default;
};
/// NumberExprAST - Expression class for numeric literals like "1.0".
@@ -149,6 +152,7 @@ public:
std::unique_ptr<ExprAST> Body)
: Proto(std::move(Proto)), Body(std::move(Body)) {}
};
+
} // end anonymous namespace
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud