[PATCH] Use MCFillFragment for zero-initialized data

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Jun 26 13:17:42 PDT 2013


  Please also add a test with a non zero address space. It can be small, say [4 x [4 x i32]], just to make sure it still works.


================
Comment at: lib/MC/MCObjectStreamer.cpp:379
@@ +378,3 @@
+void MCObjectStreamer::EmitZeros(uint64_t NumBytes, unsigned AddrSpace) {
+  assert(AddrSpace == 0 && "Address space must be 0!");
+  unsigned ItemSize = getCurrentSection().first->isVirtualSection() ? 0 : 1;
----------------
I don't think you can assert that. Just forward to MCStreamer::EmitZeros if the address space is not zero.


http://llvm-reviews.chandlerc.com/D1043



More information about the llvm-commits mailing list