@@ -155,8 +155,8 @@ be generated with calls like this:
155
155
156
156
.. code-block :: c++
157
157
158
- auto LHS = llvm ::make_unique<VariableExprAST>("x");
159
- auto RHS = llvm ::make_unique<VariableExprAST>("y");
158
+ auto LHS = std ::make_unique<VariableExprAST>("x");
159
+ auto RHS = std ::make_unique<VariableExprAST>("y");
160
160
auto Result = std::make_unique<BinaryExprAST>('+', std::move(LHS),
161
161
std::move(RHS));
162
162
@@ -210,7 +210,7 @@ which parses that production. For numeric literals, we have:
210
210
211
211
/// numberexpr ::= number
212
212
static std::unique_ptr<ExprAST> ParseNumberExpr() {
213
- auto Result = llvm ::make_unique<NumberExprAST>(NumVal);
213
+ auto Result = std ::make_unique<NumberExprAST>(NumVal);
214
214
getNextToken(); // consume the number
215
215
return std::move(Result);
216
216
}
@@ -276,7 +276,7 @@ function calls:
276
276
getNextToken(); // eat identifier.
277
277
278
278
if (CurTok != '(') // Simple variable ref.
279
- return llvm ::make_unique<VariableExprAST>(IdName);
279
+ return std ::make_unique<VariableExprAST>(IdName);
280
280
281
281
// Call.
282
282
getNextToken(); // eat (
@@ -300,7 +300,7 @@ function calls:
300
300
// Eat the ')'.
301
301
getNextToken();
302
302
303
- return llvm ::make_unique<CallExprAST>(IdName, std::move(Args));
303
+ return std ::make_unique<CallExprAST>(IdName, std::move(Args));
304
304
}
305
305
306
306
This routine follows the same style as the other routines. (It expects
@@ -503,7 +503,7 @@ then continue parsing:
503
503
}
504
504
505
505
// Merge LHS/RHS.
506
- LHS = llvm ::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
506
+ LHS = std ::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
507
507
std::move(RHS));
508
508
} // loop around to the top of the while loop.
509
509
}
@@ -533,7 +533,7 @@ above two blocks duplicated for context):
533
533
return nullptr;
534
534
}
535
535
// Merge LHS/RHS.
536
- LHS = llvm ::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
536
+ LHS = std ::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
537
537
std::move(RHS));
538
538
} // loop around to the top of the while loop.
539
539
}
@@ -593,7 +593,7 @@ expressions):
593
593
// success.
594
594
getNextToken(); // eat ')'.
595
595
596
- return llvm ::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
596
+ return std ::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
597
597
}
598
598
599
599
Given this, a function definition is very simple, just a prototype plus
@@ -608,7 +608,7 @@ an expression to implement the body:
608
608
if (!Proto) return nullptr;
609
609
610
610
if (auto E = ParseExpression())
611
- return llvm ::make_unique<FunctionAST>(std::move(Proto), std::move(E));
611
+ return std ::make_unique<FunctionAST>(std::move(Proto), std::move(E));
612
612
return nullptr;
613
613
}
614
614
@@ -634,8 +634,8 @@ nullary (zero argument) functions for them:
634
634
static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
635
635
if (auto E = ParseExpression()) {
636
636
// Make an anonymous proto.
637
- auto Proto = llvm ::make_unique<PrototypeAST>("", std::vector<std::string>());
638
- return llvm ::make_unique<FunctionAST>(std::move(Proto), std::move(E));
637
+ auto Proto = std ::make_unique<PrototypeAST>("", std::vector<std::string>());
638
+ return std ::make_unique<FunctionAST>(std::move(Proto), std::move(E));
639
639
}
640
640
return nullptr;
641
641
}
0 commit comments