[LLVMdev] clang optimizer does not remove unused/uneeded variables(and accesses) from global scope

Dennis Luehring dl.soluz at gmx.net
Thu Jul 5 03:53:59 PDT 2012


addition to my last post: 
http://groups.google.com/group/llvm-dev/browse_thread/thread/afd85c3f303ec2a9

i know that using static on my globals will remove them - no other 
compilation unit can then extern the vars

but my question is - in this closed szenario clang is "directly" 
producing the exe - isn't clang aware of that the vars are not in use?

btw: the microsoft compiler still keeps them - even if static, but 
without demangled names :)



More information about the llvm-dev mailing list