[llvm] r203821 - MCDwarf: Refactor line table handling into a single data structure

Eric Christopher echristo at gmail.com
Thu Mar 13 11:32:07 PDT 2014

On Thu, Mar 13, 2014 at 11:30 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> Thanks for the pointer - Eric and I were chatting about this on the
>> way in this morning & I've some ideas about how this refactoring could
>> lay the foundation for resolving that issue - though I'm not sure I'll
>> get all the way to that in this particular refactoring effort. The
>> debug_line.dwo is my motivating use case for now.
>> (basically the idea is that once we've got line tables as a reusable
>> component it'd be nice to have each (compile or type) unit refer to
>> its line table directly (rather than going through DwarfDebug then to
>> MCStreamer and looking up by CUID each time..) - once that happens, we
>> could build a line table factory function into the MCStreamer - and
>> MCAsmStreamer would just keep returning the same line table while
>> MCObjectStreamer would return a new one each time (and we'd just keep
>> the type unit 'line' table in DwarfDebug directly))
> But that would keep the current undesirable behavior that "llc foo.bc
> -o foo.s  && clang -c foo.s" produces one compile unit and "llc
> -filetype=obj foo.bc" produces multiple, no? To fix that we really
> need to find a way to represent multiple compilation units in the
> assembly file.

Yeah, it would still have that behavior. Fixing that would be nice,
but at least this makes it not be quite so much of a hack.


More information about the llvm-commits mailing list