[llvm] r200059 - Fix llvm-dis to print the inalloca bit on allocas.

Reid Kleckner reid at kleckner.net
Fri Jan 24 17:24:06 PST 2014


Author: rnk
Date: Fri Jan 24 19:24:06 2014
New Revision: 200059

URL: http://llvm.org/viewvc/llvm-project?rev=200059&view=rev
Log:
Fix llvm-dis to print the inalloca bit on allocas.

Modified:
    llvm/trunk/lib/IR/AsmWriter.cpp

Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=200059&r1=200058&r2=200059&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Fri Jan 24 19:24:06 2014
@@ -1945,6 +1945,8 @@ void AssemblyWriter::printInstruction(co
   } 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);





More information about the llvm-commits mailing list