Fix llvm-dis to print the inalloca bit on allocas.
authorReid Kleckner <reid@kleckner.net>
Sat, 25 Jan 2014 01:24:06 +0000 (01:24 +0000)
committerReid Kleckner <reid@kleckner.net>
Sat, 25 Jan 2014 01:24:06 +0000 (01:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200059 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/AsmWriter.cpp

index 73b407ea1b41d629558fb3a04925c56883cfdfc0..2b23278a88cbad422b108cf5f8affab4879bbe89 100644 (file)
@@ -1945,6 +1945,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
   } else if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
     Out << ' ';
     TypePrinter.print(AI->getAllocatedType(), Out);
+    if (AI->isUsedWithInAlloca())
+      Out << ", inalloca";
     if (!AI->getArraySize() || AI->isArrayAllocation()) {
       Out << ", ";
       writeOperand(AI->getArraySize(), true);