From: David Blaikie Date: Wed, 29 Jul 2015 20:26:23 +0000 (+0000) Subject: [opaque pointers] Remove use of PointerType::getElementType in favor of GEPOperator... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=0552dc73a4cbcd3934db1b0560f163f0b1e487f4;hp=a53ce4e0be51725468c589b1d0a070b30fffacde [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 --- 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 << ", "; }