projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a818c30
)
Fix printing of Alloca instructions with null operands.
author
Dan Gohman
<gohman@apple.com>
Fri, 31 Jul 2009 18:23:24 +0000
(18:23 +0000)
committer
Dan Gohman
<gohman@apple.com>
Fri, 31 Jul 2009 18:23:24 +0000
(18:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77697
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/AsmWriter.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/AsmWriter.cpp
b/lib/VMCore/AsmWriter.cpp
index 8824fd9244f915673ed85c4e019fd6217183e1bc..8358c5d84c478e9bd75c97d87793aed8dfadd27c 100644
(file)
--- 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);
}