Revert "[TableGen] Use cast instead of dyn_cast where result isn't checked before being dereferenced."

Turns out I misread the parentheses. Though I'm pretty sure its always a RecordRecTy and non of the callers really seem to expect null. But until I'm completely sure I'm going to revert this.

llvm-svn: 235469
This commit is contained in:
Craig Topper 2015-04-22 02:59:06 +00:00
parent c7a9cfb7f6
commit b534eabf9e
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ Init *DagRecTy::convertValue(BinOpInit *BO) {
} }
RecordRecTy *RecordRecTy::get(Record *R) { RecordRecTy *RecordRecTy::get(Record *R) {
return cast<RecordRecTy>(R->getDefInit()->getType()); return dyn_cast<RecordRecTy>(R->getDefInit()->getType());
} }
std::string RecordRecTy::getAsString() const { std::string RecordRecTy::getAsString() const {