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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235469
91177308-0d34-0410-b5e6-
96231b3b80d8
}
RecordRecTy *RecordRecTy::get(Record *R) {
- return cast<RecordRecTy>(R->getDefInit()->getType());
+ return dyn_cast<RecordRecTy>(R->getDefInit()->getType());
}
std::string RecordRecTy::getAsString() const {