summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2013-06-27 14:35:03 +0000
committerSerge Pavlov <sepavloff@gmail.com>2013-06-27 14:35:03 +0000
commit24a3ebb78d7772f8c1ad045900ca6e1c75e444e5 (patch)
tree1b801d8873c84963d74b7f83f0a449a6a5cb69a4 /llvm/lib/MC/MCAssembler.cpp
parent1c348978872fd56fbe03bb0b887e3be4f673a903 (diff)
downloadbcm5719-llvm-24a3ebb78d7772f8c1ad045900ca6e1c75e444e5.tar.gz
bcm5719-llvm-24a3ebb78d7772f8c1ad045900ca6e1c75e444e5.zip
Use MCFillFragment for zero-initialized data.
It fixes PR16338 (ICE when compiling very large two-dimensional array). Differential Revision: http://llvm-reviews.chandlerc.com/D1043 llvm-svn: 185080
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 97f675a1ffa..24f4b8e635e 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -708,12 +708,13 @@ void MCAssembler::writeSectionData(const MCSectionData *SD,
case MCFragment::FT_Align:
// Check that we aren't trying to write a non-zero value into a virtual
// section.
- assert((!cast<MCAlignFragment>(it)->getValueSize() ||
- !cast<MCAlignFragment>(it)->getValue()) &&
+ assert((cast<MCAlignFragment>(it)->getValueSize() == 0 ||
+ cast<MCAlignFragment>(it)->getValue() == 0) &&
"Invalid align in virtual section!");
break;
case MCFragment::FT_Fill:
- assert(!cast<MCFillFragment>(it)->getValueSize() &&
+ assert((cast<MCFillFragment>(it)->getValueSize() == 0 ||
+ cast<MCFillFragment>(it)->getValue() == 0) &&
"Invalid fill in virtual section!");
break;
}
OpenPOWER on IntegriCloud