Page MenuHomePhabricator

[WebAssembly] Setting export_name implies no_dead_strip
ClosedPublic

Authored by sbc100 on Dec 13 2019, 2:46 PM.

Details

Summary

This change updates the clang front end to add symbols to llvm.used
when they have explicit export_name attribute.

In also causes the .export_name assempler directive to imply the
MCSA_NoDeadStrip symbol attribute.

Diff Detail

Event Timeline

sbc100 created this revision.Dec 13 2019, 2:46 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 13 2019, 2:46 PM
dschuff accepted this revision.Dec 16 2019, 2:15 PM
This revision is now accepted and ready to land.Dec 16 2019, 2:15 PM
sunfish added inline comments.Dec 16 2019, 2:18 PM
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
725 ↗(On Diff #234144)

It feels like this is a little inconsistent. If export_name doesn't automatically imply used in LLVM IR or .o files, why does it do so in .s files?

sbc100 marked an inline comment as done.Dec 16 2019, 2:41 PM
sbc100 added inline comments.
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
725 ↗(On Diff #234144)

OK, reverted that part.

sbc100 updated this revision to Diff 234160.Dec 16 2019, 2:44 PM
  • revert part
This revision was automatically updated to reflect the committed changes.