From f818cfe0969d74ca356f87947b651230fdad6ed0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 3 May 2005 16:44:45 +0000 Subject: [PATCH] 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 --- lib/VMCore/Instructions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 8404e0bad8e..5c88c5428dd 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(); } //===----------------------------------------------------------------------===// -- 2.34.1