OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
749e583
)
Fix GlobalISel build.
author
Peter Collingbourne
<peter@pcc.me.uk>
Fri, 2 Dec 2016 02:55:30 +0000
(
02:55
+0000)
committer
Peter Collingbourne
<peter@pcc.me.uk>
Fri, 2 Dec 2016 02:55:30 +0000
(
02:55
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288460
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/GlobalISel/IRTranslator.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/GlobalISel/IRTranslator.cpp
b/lib/CodeGen/GlobalISel/IRTranslator.cpp
index
ec255b5
..
e8d1ce0
100644
(file)
--- a/
lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/
lib/CodeGen/GlobalISel/IRTranslator.cpp
@@
-336,7
+336,7
@@
bool IRTranslator::translateGetElementPtr(const User &U) {
for (gep_type_iterator GTI = gep_type_begin(&U), E = gep_type_end(&U);
GTI != E; ++GTI) {
const Value *Idx = GTI.getOperand();
- if (StructType *StTy =
dyn_cast<StructType>(*GTI
)) {
+ if (StructType *StTy =
GTI.getStructTypeOrNull(
)) {
unsigned Field = cast<Constant>(Idx)->getUniqueInteger().getZExtValue();
Offset += DL->getStructLayout(StTy)->getElementOffset(Field);
continue;