This is an archive of the discontinued LLVM Phabricator instance.

fix nullptr Mangler in LTOModule
ClosedPublic

Authored by inglorion on Feb 3 2017, 4:48 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

inglorion created this revision.Feb 3 2017, 4:48 PM
pcc edited edge metadata.Feb 3 2017, 4:56 PM

I think this is a functional change in that we will emit COFF linker flags in non-COFF objects. An easy fix would be to ask TT what the object format is.

Do you understand why there was a nullptr before?

Good point on the functional change. I'll implement your suggestion to check TT. I don't know yet why there was a nullptr before; this is intended more as a temporary stopgap for until I figure that out.

inglorion updated this revision to Diff 87058.Feb 3 2017, 5:33 PM

Only call getObjFileLoweringCOFF when we are actually generating for a target that has COFF - if not, we don't need to do anything here.

pcc accepted this revision.Feb 3 2017, 5:35 PM

LGTM

lib/LTO/LTOModule.cpp
653 ↗(On Diff #87058)

Nit: if (!TT.isOSBinFormatCOFF())

This revision is now accepted and ready to land.Feb 3 2017, 5:35 PM
inglorion updated this revision to Diff 87059.Feb 3 2017, 5:38 PM

if (!TT.isOSBinFormatCOFF())

This revision was automatically updated to reflect the committed changes.