summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter3/toy.cpp')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter3/toy.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter3/toy.cpp b/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
index 8aad3f4d7be..f7b2d988fd1 100644
--- a/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
@@ -223,7 +223,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
/// numberexpr ::= number
static std::unique_ptr<ExprAST> ParseNumberExpr() {
- auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+ auto Result = std::make_unique<NumberExprAST>(NumVal);
getNextToken(); // consume the number
return std::move(Result);
}
@@ -250,7 +250,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
getNextToken(); // eat identifier.
if (CurTok != '(') // Simple variable ref.
- return llvm::make_unique<VariableExprAST>(IdName);
+ return std::make_unique<VariableExprAST>(IdName);
// Call.
getNextToken(); // eat (
@@ -274,7 +274,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
// Eat the ')'.
getNextToken();
- return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+ return std::make_unique<CallExprAST>(IdName, std::move(Args));
}
/// primary
@@ -327,7 +327,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
// Merge LHS/RHS.
LHS =
- llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+ std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
}
}
@@ -363,7 +363,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
// success.
getNextToken(); // eat ')'.
- return llvm::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
+ return std::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
}
/// definition ::= 'def' prototype expression
@@ -374,7 +374,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
return nullptr;
if (auto E = ParseExpression())
- return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+ return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
return nullptr;
}
@@ -382,9 +382,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
if (auto E = ParseExpression()) {
// Make an anonymous proto.
- auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+ auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
std::vector<std::string>());
- return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+ return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
}
return nullptr;
}
@@ -598,7 +598,7 @@ int main() {
getNextToken();
// Make the module, which holds all the code.
- TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+ TheModule = std::make_unique<Module>("my cool jit", TheContext);
// Run the main "interpreter loop" now.
MainLoop();
OpenPOWER on IntegriCloud