[llvm] r328805 - Reapply "[DWARFv5] Emit file 0 to the line table."

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 11:44:13 PST 2019


On Mon, Jan 28, 2019 at 11:12 AM <paul.robinson at sony.com> wrote:

> Hey Paul,
>
> I've been experimenting with DWARFv5 broadly applied to some code at
> Google & found that clang crashes when trying to emit DWARFv5 on an empty
> assembly file. Turns out llvm-mc does not because of the above code block.
>
> Seems this support is here for llvm-mc, but missing from clang's
> initialization of MCContext for cc1as.
>
> Could you refactor/common/add equivalent functionality to Clang's cc1as?
> (looks like somewhere near clang/tools/driver/cc1as_main.cpp:400? (since
> that is where "setMainFileName" is, which is near this block in llvm-mc
> too))
>
> - Dave
>
> You mean, like a zero-length file?  For me, `llvm-mc –g t.s` also crashes
> with that.  Or a .s file with only a comment in it.
>

Hmm, llvm-mc doesn't seem to crash for me...


> Looks like clang and llvm-mc crash in different places too.
>

Maybe different default targets, etc? Not sure.


>  I'll take a look.
>

Thanks!


> --paulr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190128/881a7892/attachment.html>


More information about the llvm-commits mailing list