aboutsummaryrefslogtreecommitdiff
path: root/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r--lib/TableGen/TGParser.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp
index a9ace152d59e..c373e2899a5d 100644
--- a/lib/TableGen/TGParser.cpp
+++ b/lib/TableGen/TGParser.cpp
@@ -378,7 +378,7 @@ bool TGParser::resolve(const ForeachLoop &Loop, SubstStack &Substs,
auto LI = dyn_cast<ListInit>(List);
if (!LI) {
if (!Final) {
- Dest->emplace_back(make_unique<ForeachLoop>(Loop.Loc, Loop.IterVar,
+ Dest->emplace_back(std::make_unique<ForeachLoop>(Loop.Loc, Loop.IterVar,
List));
return resolve(Loop.Entries, Substs, Final, &Dest->back().Loop->Entries,
Loc);
@@ -413,7 +413,7 @@ bool TGParser::resolve(const std::vector<RecordsEntry> &Source,
if (E.Loop) {
Error = resolve(*E.Loop, Substs, Final, Dest);
} else {
- auto Rec = make_unique<Record>(*E.Rec);
+ auto Rec = std::make_unique<Record>(*E.Rec);
if (Loc)
Rec->appendLoc(*Loc);
@@ -1147,9 +1147,9 @@ Init *TGParser::ParseOperation(Record *CurRec, RecTy *ItemType) {
if (!InitList.back()) return nullptr;
// All BinOps require their arguments to be of compatible types.
- TypedInit *TI = dyn_cast<TypedInit>(InitList.back());
+ RecTy *ListType = cast<TypedInit>(InitList.back())->getType();
if (!ArgType) {
- ArgType = TI->getType();
+ ArgType = ListType;
switch (Code) {
case BinOpInit::LISTCONCAT:
@@ -1198,11 +1198,11 @@ Init *TGParser::ParseOperation(Record *CurRec, RecTy *ItemType) {
default: llvm_unreachable("other ops have fixed argument types");
}
} else {
- RecTy *Resolved = resolveTypes(ArgType, TI->getType());
+ RecTy *Resolved = resolveTypes(ArgType, ListType);
if (!Resolved) {
Error(InitLoc, Twine("expected value of type '") +
- ArgType->getAsString() + "', got '" +
- TI->getType()->getAsString() + "'");
+ ArgType->getAsString() + "', got '" +
+ ListType->getAsString() + "'");
return nullptr;
}
if (Code != BinOpInit::ADD && Code != BinOpInit::AND &&
@@ -1330,7 +1330,7 @@ Init *TGParser::ParseOperation(Record *CurRec, RecTy *ItemType) {
std::unique_ptr<Record> ParseRecTmp;
Record *ParseRec = CurRec;
if (!ParseRec) {
- ParseRecTmp = make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
+ ParseRecTmp = std::make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
ParseRec = ParseRecTmp.get();
}
@@ -1597,7 +1597,7 @@ Init *TGParser::ParseOperation(Record *CurRec, RecTy *ItemType) {
std::unique_ptr<Record> ParseRecTmp;
Record *ParseRec = CurRec;
if (!ParseRec) {
- ParseRecTmp = make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
+ ParseRecTmp = std::make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
ParseRec = ParseRecTmp.get();
}
@@ -2702,10 +2702,10 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) {
return true;
if (isa<UnsetInit>(Name))
- CurRec = make_unique<Record>(Records.getNewAnonymousName(), DefLoc, Records,
+ CurRec = std::make_unique<Record>(Records.getNewAnonymousName(), DefLoc, Records,
/*Anonymous=*/true);
else
- CurRec = make_unique<Record>(Name, DefLoc, Records);
+ CurRec = std::make_unique<Record>(Name, DefLoc, Records);
if (ParseObjectBody(CurRec.get()))
return true;
@@ -2783,7 +2783,7 @@ bool TGParser::ParseForeach(MultiClass *CurMultiClass) {
Lex.Lex(); // Eat the in
// Create a loop object and remember it.
- Loops.push_back(llvm::make_unique<ForeachLoop>(Loc, IterName, ListValue));
+ Loops.push_back(std::make_unique<ForeachLoop>(Loc, IterName, ListValue));
if (Lex.getCode() != tgtok::l_brace) {
// FOREACH Declaration IN Object
@@ -2834,7 +2834,7 @@ bool TGParser::ParseClass() {
} else {
// If this is the first reference to this class, create and add it.
auto NewRec =
- llvm::make_unique<Record>(Lex.getCurStrVal(), Lex.getLoc(), Records,
+ std::make_unique<Record>(Lex.getCurStrVal(), Lex.getLoc(), Records,
/*Class=*/true);
CurRec = NewRec.get();
Records.addClass(std::move(NewRec));
@@ -2963,7 +2963,7 @@ bool TGParser::ParseMultiClass() {
auto Result =
MultiClasses.insert(std::make_pair(Name,
- llvm::make_unique<MultiClass>(Name, Lex.getLoc(),Records)));
+ std::make_unique<MultiClass>(Name, Lex.getLoc(),Records)));
if (!Result.second)
return TokError("multiclass '" + Name + "' already defined");