forked from OSchip/llvm-project
Fix printing of Alloca instructions with null operands.
llvm-svn: 77697
This commit is contained in:
parent
dc2b1b0a1c
commit
b53e26c7eb
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue