diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index b81254b99cc..bdafbbc6209 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -345,7 +345,7 @@ Init *DagRecTy::convertValue(BinOpInit *BO) { } RecordRecTy *RecordRecTy::get(Record *R) { - return cast(R->getDefInit()->getType()); + return dyn_cast(R->getDefInit()->getType()); } std::string RecordRecTy::getAsString() const {