diff options
author | Sean Silva <silvas@purdue.edu> | 2012-10-05 03:31:58 +0000 |
---|---|---|
committer | Sean Silva <silvas@purdue.edu> | 2012-10-05 03:31:58 +0000 |
commit | 736ceace11249da645ec4ed91b8714832193ead4 (patch) | |
tree | ab9c91b06c5f1cb4669f52de8616c2ba73428ebc /lib/TableGen/TGParser.cpp | |
parent | 89adeb225db4cd4d5c671d2ac5e2e6a6e755b5bc (diff) |
tblgen: Replace uses of dynamic_cast<XXXRecTy> with dyn_cast<>.
This is a mechanical change of dynamic_cast<> to dyn_cast<>. A number of
these uses are actually more like isa<> or cast<>, and will be changed
to the semanticaly appropriate one in a future patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r-- | lib/TableGen/TGParser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index aee93e7696..82d1957214 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -864,8 +864,8 @@ Init *TGParser::ParseOperation(Record *CurRec) { return 0; } if (LHSt) { - ListRecTy *LType = dynamic_cast<ListRecTy*>(LHSt->getType()); - StringRecTy *SType = dynamic_cast<StringRecTy*>(LHSt->getType()); + ListRecTy *LType = dyn_cast<ListRecTy>(LHSt->getType()); + StringRecTy *SType = dyn_cast<StringRecTy>(LHSt->getType()); if (LType == 0 && SType == 0) { TokError("expected list or string type argumnet in unary operator"); return 0; @@ -897,7 +897,7 @@ Init *TGParser::ParseOperation(Record *CurRec) { } } else { assert(LHSt && "expected list type argument in unary operator"); - ListRecTy *LType = dynamic_cast<ListRecTy*>(LHSt->getType()); + ListRecTy *LType = dyn_cast<ListRecTy>(LHSt->getType()); if (LType == 0) { TokError("expected list type argumnet in unary operator"); return 0; @@ -1271,7 +1271,7 @@ Init *TGParser::ParseSimpleValue(Record *CurRec, RecTy *ItemType, ListRecTy *GivenListTy = 0; if (ItemType != 0) { - ListRecTy *ListType = dynamic_cast<ListRecTy*>(ItemType); + ListRecTy *ListType = dyn_cast<ListRecTy>(ItemType); if (ListType == 0) { std::stringstream s; s << "Type mismatch for list, expected list type, got " @@ -1723,7 +1723,7 @@ VarInit *TGParser::ParseForeachDeclaration(ListInit *&ForeachListValue) { return 0; } RecTy *ValueType = ForeachListValue->getType(); - ListRecTy *ListType = dynamic_cast<ListRecTy *>(ValueType); + ListRecTy *ListType = dyn_cast<ListRecTy>(ValueType); if (ListType == 0) { TokError("Value list is not of list type"); return 0; |