Add LLVM_ATTRIBUTE_USED to fix problems which could be exposed by aggressive global...
authorFangrui Song <i@maskray.me>
Mon, 26 Apr 2021 20:31:37 +0000 (13:31 -0700)
committerFangrui Song <i@maskray.me>
Mon, 26 Apr 2021 20:31:37 +0000 (13:31 -0700)
commitb81244fa4ff9188df22847c6e11e050892292002
tree580920a22d83e18944751b7576f2b435a46bff46
parent614de225c92bc3998a83a274e84dfb94ec8a7840
Add LLVM_ATTRIBUTE_USED to fix problems which could be exposed by aggressive global pointer variable removal

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.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D101217
llvm/lib/Support/BuryPointer.cpp
llvm/lib/Support/Unix/Signals.inc