diff options
| author | Dan Gohman <gohman@apple.com> | 2009-07-31 18:23:24 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-07-31 18:23:24 +0000 |
| commit | b53e26c7eb6ce9feefed51b9579dbeee0d4d9bf6 (patch) | |
| tree | 135b624ed263b8d4f6f0ef0e0f4f714a25424eb9 | |
| parent | dc2b1b0a1c5eb57cfeb6c15fae12bbfab784bc5d (diff) | |
| download | bcm5719-llvm-b53e26c7eb6ce9feefed51b9579dbeee0d4d9bf6.tar.gz bcm5719-llvm-b53e26c7eb6ce9feefed51b9579dbeee0d4d9bf6.zip | |
Fix printing of Alloca instructions with null operands.
llvm-svn: 77697
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 8824fd9244f..8358c5d84c4 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -1915,7 +1915,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) { } 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); } |

