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 | 98c61711c6c5239b68e33a975090542d9731bdbc (patch) | |
tree | 6861626aa3f84ad041f7b976fc5b803192621470 /llvm/lib/TableGen/TGParser.cpp | |
parent | 303c8e36ef8b3adbec120750a9f35caeafe82075 (diff) | |
download | bcm5719-llvm-98c61711c6c5239b68e33a975090542d9731bdbc.tar.gz bcm5719-llvm-98c61711c6c5239b68e33a975090542d9731bdbc.zip |
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.
llvm-svn: 165291
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r-- | llvm/lib/TableGen/TGParser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index aee93e7696b..82d19572148 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/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; |