From 1d1670227b5c2db7054f6fd70cc46c86914eaf53 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Sat, 25 Jan 2014 01:24:06 +0000 Subject: [PATCH] Fix llvm-dis to print the inalloca bit on allocas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200059 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/AsmWriter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp index 73b407ea1b4..2b23278a88c 100644 --- a/lib/IR/AsmWriter.cpp +++ b/lib/IR/AsmWriter.cpp @@ -1945,6 +1945,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) { } else if (const AllocaInst *AI = dyn_cast(&I)) { Out << ' '; TypePrinter.print(AI->getAllocatedType(), Out); + if (AI->isUsedWithInAlloca()) + Out << ", inalloca"; if (!AI->getArraySize() || AI->isArrayAllocation()) { Out << ", "; writeOperand(AI->getArraySize(), true);