This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Emit diagnostics when enabling -fdebug-types-section on non-linux target.
ClosedPublic

Authored by JDevlieghere on Jul 20 2018, 2:55 AM.

Details

Summary

Currently, support for debug_types is only present for ELF and trying to pass -fdebug-types-section for other targets results in a crash in the backend. Until this is fixed, we should emit a diagnostic in the front end when the option is passed for non-linux targets.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Jul 20 2018, 2:55 AM

Please see PR38190 for more details.

I believe debug_types is used on non-linux targets as well. Judging by the other review all ELF targets should at least have a chance of working, so maybe key the error off of that?

Thanks, I meant to use isOSBinFormatELF but I think it got lost in an accidental undo. The test didn't capture that because it's using a linux target triple.

Is this because type units depend on COMDAT support? I had a vague idea that COFF also supports COMDAT.

Is this because type units depend on COMDAT support? I had a vague idea that COFF also supports COMDAT.

It's more that I want to reflect the current situation and prevent MC from crashing while we come up with a solution. This was very little work and we can always revert it once things are fixed.

probinson accepted this revision.Jul 20 2018, 10:17 AM

If the plan is for this to be relatively temporary then LGTM.

This revision is now accepted and ready to land.Jul 20 2018, 10:17 AM
This revision was automatically updated to reflect the committed changes.