[PATCH] CodeGen: Don't emit a thread-wrapper if we can't touch the backing variable

Richard Smith richard at metafoo.co.uk
Tue Jul 8 18:00:48 PDT 2014


================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1846-1848
@@ +1845,5 @@
+  if (isThreadWrapperReplaceable(VD, CGM)) {
+    if (llvm::GlobalVariable::isLinkOnceLinkage(VarLinkage))
+      return llvm::GlobalVariable::WeakAnyLinkage;
+    return VarLinkage;
+  }
----------------
I think you should also give a `WeakODRLinkage` variable a `WeakAnyLinkage` wrapper.

http://reviews.llvm.org/D4109






More information about the cfe-commits mailing list