http://llvm.org/bugs/show_bug.cgi?id=9761
Summary: AsmPrinter::EmitEndOfAsmFile is not the final code
emission point.
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
The comments for this function is:
"/// EmitEndOfAsmFile - This virtual method can be overridden by targets that
/// want to emit something at the end of their file."
This to me means that nothing else should be emitted after this point.
However, in doFinalization of AsmPrinter, the sequence is as follows:
// Allow the target to emit any magic that it wants at the end of the file,
// after everything else has gone out.
EmitEndOfAsmFile(M);
delete Mang; Mang = 0;
MMI = 0;
OutStreamer.Finish();
The comment above EmitEndOfAsmFile also implies that nothing else should be
emitted after this location. The problem comes from the OutStreamer.Finish()
function which emits the following:
void MCAsmStreamer::Finish() {
// Dump out the dwarf file & directory tables and line tables.
if (getContext().hasDwarfFiles() && !UseLoc)
MCDwarfFileTable::Emit(this);
}
The DwarfFileTable is emitted AFTER the last item that should be emitted into
the file. Nothing should be emitted to the output stream after
EmitEndOfAsmFile, otherwise there is no point in having the hook.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs