From b534eabf9ee88b7c1102d548ea537b2ee6ee10f9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 22 Apr 2015 02:59:06 +0000 Subject: 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 --- llvm/lib/TableGen/Record.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm') diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp index b81254b99cc..bdafbbc6209 100644 --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/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 { -- cgit v1.2.3