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 | 69bff07b4dc95fd0cc9d7580977beb08259daa17 (patch) | |
tree | 5956d992fae031ec019508d517150d0cb491eb96 | |
parent | a818c30d664cd4ba4b9ed69fb2048a6ea55ec9cd (diff) | |
download | external_llvm-69bff07b4dc95fd0cc9d7580977beb08259daa17.zip external_llvm-69bff07b4dc95fd0cc9d7580977beb08259daa17.tar.gz external_llvm-69bff07b4dc95fd0cc9d7580977beb08259daa17.tar.bz2 |
Fix printing of Alloca instructions with null operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77697 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 8824fd9..8358c5d 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/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); } |