[PATCH] Don't localize globals that may serve as leak checker roots.
rafael.espindola at gmail.com
Thu Sep 26 06:21:38 PDT 2013
> having magic semantics for globals with a certain type seems like a bad idea
> to me. Here the global in effect has a secret external use, but that isn't
> clear from the IR. In my opinion it's only asking for trouble and it would
> better to make it explicit by requiring all GC roots to be used by (eg) a
> llvm.gc_root global, analogous to llvm.used.
Yes, that is my main objection to where the patch is going, not
missing this optimization.
If the optimization is really not important, we can just nuke it to
make leak checker happy. If it is important in some cases, we should
move isLeakCheckerRoot to clang.
More information about the llvm-commits