From 0552dc73a4cbcd3934db1b0560f163f0b1e487f4 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 29 Jul 2015 20:26:23 +0000 Subject: [PATCH 1/1] [opaque pointers] Remove use of PointerType::getElementType in favor of GEPOperator::getSourceElementType git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243566 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/AsmWriter.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp index 823916e7690..9018180ad75 100644 --- a/lib/IR/AsmWriter.cpp +++ b/lib/IR/AsmWriter.cpp @@ -1340,10 +1340,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV, Out << " ("; if (const GEPOperator *GEP = dyn_cast(CE)) { - TypePrinter.print( - cast(GEP->getPointerOperandType()->getScalarType()) - ->getElementType(), - Out); + TypePrinter.print(GEP->getSourceElementType(), Out); Out << ", "; } -- 2.34.1