summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/TableGen/Record.cpp2
1 files changed, 1 insertions, 1 deletions
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<RecordRecTy>(R->getDefInit()->getType());
+ return dyn_cast<RecordRecTy>(R->getDefInit()->getType());
}
std::string RecordRecTy::getAsString() const {
OpenPOWER on IntegriCloud