efriedma added a comment. The only difference between weak_odr and linkonce_odr is that the LLVM optimizers can discard linkonce_odr globals. From your description, you want to remove the odr-ness, by changing the linkage to "linkonce", I think?
That said, I don't think the usage here violates LangRef's definition of linkonce_odr; the "odr"-ness refers to the global's initializer, not its linkage. Repository: rC Clang https://reviews.llvm.org/D46665 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits