http://llvm.org/pr23472

As suggested by Reid, OK to commit?
Index: tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
===================================================================
--- tools/clang/lib/CodeGen/ItaniumCXXABI.cpp   (revision 246575)
+++ tools/clang/lib/CodeGen/ItaniumCXXABI.cpp   (working copy)
@@ -1826,7 +1826,8 @@
     // The ABI says: It is suggested that it be emitted in the same COMDAT 
group
     // as the associated data object
     llvm::Comdat *C = var->getComdat();
-    if (!D.isLocalVarDecl() && C) {
+    if (!D.isLocalVarDecl() && C &&
+        CGM.getTarget().getTriple().isOSBinFormatELF()) {
       guard->setComdat(C);
       CGF.CurFn->setComdat(C);
     } else if (CGM.supportsCOMDAT() && guard->isWeakForLinker()) {
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to