GlobalDCE: Delete available_externally initializers if it allows removing the value...
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 4 Jul 2014 12:36:05 +0000 (12:36 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 4 Jul 2014 12:36:05 +0000 (12:36 +0000)
commit5b55a47e94e28fbb56d0cd5d72c3db9105c15b4c
tree504686ff20292aeb2e1b0db101fbf8ee19647a3f
parentf3f355dd959b95e0602c5cc460a77c7f6ce280ce
GlobalDCE: Delete available_externally initializers if it allows removing the value the initializer is referring to.

This is useful for functions that are not actually available externally but
referenced by a vtable of some kind. Clang emits functions like this for the MS
ABI.

PR20182.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212337 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalDCE.cpp
test/Transforms/GlobalDCE/externally_available.ll