Minor cleanup.
authorDan Gohman <dan433584@gmail.com>
Fri, 8 Feb 2013 22:01:47 +0000 (22:01 +0000)
committerDan Gohman <dan433584@gmail.com>
Fri, 8 Feb 2013 22:01:47 +0000 (22:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174756 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/AsmWriter.cpp

index 11e06c9750d54e6c1b09751ee969c0a93db32c23..efa59788aa50aac0917a57cb8ab7383268a7a70c 100644 (file)
@@ -1923,7 +1923,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
 
   } else if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
     Out << ' ';
-    TypePrinter.print(AI->getType()->getElementType(), Out);
+    TypePrinter.print(AI->getAllocatedType(), Out);
     if (!AI->getArraySize() || AI->isArrayAllocation()) {
       Out << ", ";
       writeOperand(AI->getArraySize(), true);