aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-03 16:44:45 +0000
committerChris Lattner <sabre@nondot.org>2005-05-03 16:44:45 +0000
commitf818cfe0969d74ca356f87947b651230fdad6ed0 (patch)
tree187be5adda77430c9f749aaec2009208d14bb2f6 /lib/VMCore/Instructions.cpp
parent21506ff821ed8dc10ff9626dd7ce992b6e9571d1 (diff)
fix a bug in the 1 index GEP handling code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 8404e0bad8..5c88c5428d 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -728,7 +728,7 @@ const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, Value *Idx) {
// Check the pointer index.
if (!PTy->indexValid(Idx)) return 0;
- return PTy;
+ return PTy->getElementType();
}
//===----------------------------------------------------------------------===//