diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2013-06-27 14:35:03 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2013-06-27 14:35:03 +0000 |
commit | b02f1e9a6bc332ebd77571fdffcdc44d77e76b31 (patch) | |
tree | c9620873d1ad7501cb644af9427c68adc6c50f32 /lib/MC/MCAssembler.cpp | |
parent | 31d2f08f8893f38d2d7293195f3707edfefbeeb6 (diff) | |
download | external_llvm-b02f1e9a6bc332ebd77571fdffcdc44d77e76b31.tar.gz external_llvm-b02f1e9a6bc332ebd77571fdffcdc44d77e76b31.tar.bz2 external_llvm-b02f1e9a6bc332ebd77571fdffcdc44d77e76b31.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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
-rw-r--r-- | lib/MC/MCAssembler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 97f675a1ff..24f4b8e635 100644 --- a/lib/MC/MCAssembler.cpp +++ b/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; } |