[llvm-commits] [llvm] r77697 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Dan Gohman
gohman at apple.com
Fri Jul 31 11:23:25 PDT 2009
Author: djg
Date: Fri Jul 31 13:23:24 2009
New Revision: 77697
URL: http://llvm.org/viewvc/llvm-project?rev=77697&view=rev
Log:
Fix printing of Alloca instructions with null operands.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=77697&r1=77696&r2=77697&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Fri Jul 31 13:23:24 2009
@@ -1915,7 +1915,7 @@
} else if (const AllocationInst *AI = dyn_cast<AllocationInst>(&I)) {
Out << ' ';
TypePrinter.print(AI->getType()->getElementType(), Out);
- if (AI->isArrayAllocation()) {
+ if (!AI->getArraySize() || AI->isArrayAllocation()) {
Out << ", ";
writeOperand(AI->getArraySize(), true);
}
More information about the llvm-commits
mailing list