From 87b4c04980ada4c38620fe1e5aab3d3e0378fb0b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 22 Apr 2015 02:09:42 +0000 Subject: [PATCH] [TableGen] Use cast instead of dyn_cast where result isn't checked before being dereferenced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235463 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/Record.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 8a8f0ee3a08..3374432daa6 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 dyn_cast(R->getDefInit()->getType()); + return cast(R->getDefInit()->getType()); } std::string RecordRecTy::getAsString() const { -- 2.34.1