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:
f12338a
)
[opaque pointer type] Pass explicit pointee type in another case of GEP constant...
author
David Blaikie
<dblaikie@gmail.com>
Thu, 21 May 2015 00:06:38 +0000
(
00:06
+0000)
committer
David Blaikie
<dblaikie@gmail.com>
Thu, 21 May 2015 00:06:38 +0000
(
00:06
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237860
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/IR/ConstantFold.cpp
patch
|
blob
|
history
diff --git
a/lib/IR/ConstantFold.cpp
b/lib/IR/ConstantFold.cpp
index
16b113d
..
3f64c43
100644
(file)
--- a/
lib/IR/ConstantFold.cpp
+++ b/
lib/IR/ConstantFold.cpp
@@
-2221,7
+2221,7
@@
static Constant *ConstantFoldGetElementPtrImpl(Type *PointeeTy, Constant *C,
if (!NewIdxs.empty()) {
for (unsigned i = 0, e = Idxs.size(); i != e; ++i)
if (!NewIdxs[i]) NewIdxs[i] = cast<Constant>(Idxs[i]);
- return ConstantExpr::getGetElementPtr(
nullptr
, C, NewIdxs, inBounds);
+ return ConstantExpr::getGetElementPtr(
PointeeTy
, C, NewIdxs, inBounds);
}
// If all indices are known integers and normalized, we can do a simple