[PATCH] Bug 9761: EmitEndOfAsmFile is not the final emission point.

Matt Arsenault Matthew.Arsenault at amd.com
Tue Apr 30 18:48:56 PDT 2013


  .subsections_via_symbols isn't the last thing as it is now. This patch puts it there, breaking the 2 tests.

  The broken object tests seem to be broken not from the content, but just the order things happen to occur in.

  e.g. CodeGen/Thumb2/constant-islands.ll
  The ARMMachObjectWriter is dependent on ARMAsmPrinter::EmitEndOfAsmFile calling MCObjectStreamer::EmitLabel to set the MCDataFragment on the nonlazy pointers (LLVM ERROR: symbol 'L__ZTV7RagDoll$non_lazy_ptr' can not be undefined in a subtraction expression), and I'm not sure where to move things around to fix this.

  ARM and Mips ELF have similar problems. They add some flags in EmitEndOfAsmFile that are actually emitted in the OutStreamer Finish.

  Should these move into the MC<ELF|MachO>Streamer::FinishImpls? It seems like target specific stuff doesn't belong there. Should there be a new function? The distinction between EmitEndOfAsmFile and MCStreamer::Finish is kind of confusing. Both "claim" to be the end of emission. The Emit* functions setting state that's used later feels wrong.

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



More information about the llvm-commits mailing list