projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7a9cfb
)
Revert "[TableGen] Use cast instead of dyn_cast where result isn't checked before...
author
Craig Topper
<craig.topper@gmail.com>
Wed, 22 Apr 2015 02:59:06 +0000
(
02:59
+0000)
committer
Craig Topper
<craig.topper@gmail.com>
Wed, 22 Apr 2015 02:59:06 +0000
(
02:59
+0000)
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
patch
|
blob
|
history
diff --git
a/llvm/lib/TableGen/Record.cpp
b/llvm/lib/TableGen/Record.cpp
index
b81254b
..
bdafbbc
100644
(file)
--- 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 {