This is an archive of the discontinued LLVM Phabricator instance.

LTO: Use the correct mangler function in LTOCodeGenerator::applyScopeRestrictions().
ClosedPublic

Authored by pcc on Oct 12 2016, 12:29 PM.

Details

Summary

We need to use the overload of Mangler::getNameWithPrefix that takes a
GlobalValue in order to mangle in the stdcall stack byte count for Windows
targets.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 74418.Oct 12 2016, 12:29 PM
pcc retitled this revision from to LTO: Use the correct mangler function in LTOCodeGenerator::applyScopeRestrictions()..
pcc updated this object.
pcc added a reviewer: mehdi_amini.
pcc added subscribers: llvm-commits, hans.
mehdi_amini accepted this revision.Oct 12 2016, 12:44 PM
mehdi_amini edited edge metadata.

LGTM. Thanks!

llvm/lib/LTO/LTOCodeGenerator.cpp
425 ↗(On Diff #74418)

Can you add the comment for the bool: Mang.getNameWithPrefix(MangledName, &GV, /* CannotUsePrivateLabel */ false) ?

This revision is now accepted and ready to land.Oct 12 2016, 12:44 PM

Out of curiosity: how did you find this?

This revision was automatically updated to reflect the committed changes.
pcc marked an inline comment as done.Oct 12 2016, 1:25 PM

The COFF port of LLD uses the legacy LTOCodeGenerator, at least for now. @hans found this while building Chromium with LLD and LTO (crbug.com/655125).