This is an archive of the discontinued LLVM Phabricator instance.

Add LLVM_ATTRIBUTE_USED to fix problems which could be exposed by aggressive global pointer variable removal
ClosedPublic

Authored by MaskRay on Apr 23 2021, 6:04 PM.

Details

Summary

Note to BuryPointer.cpp:GraveYard. 'unused' cannot prevent (1) dead store
elimination and (2) removal of the global pointer variable (D69428) but 'used' can.

Discovered when comparing link maps between HEAD+D69428 and HEAD.

Diff Detail

Event Timeline

MaskRay created this revision.Apr 23 2021, 6:04 PM
MaskRay requested review of this revision.Apr 23 2021, 6:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 23 2021, 6:04 PM
lattner accepted this revision.Apr 25 2021, 12:29 PM

Looks great, thank you for catching this!

This revision is now accepted and ready to land.Apr 25 2021, 12:29 PM
This revision was landed with ongoing or failed builds.Apr 26 2021, 1:31 PM
This revision was automatically updated to reflect the committed changes.