Commit 48742e02 by Iain Buclaw

d: Use d_comdat_linkage on generated internal decl.

This adds weak linkage to internal TypeInfo data on top of the existing
DECL_COMDAT, which helps in the unlikely event that two of the same
TypeInfo data ends up in multiple places.

gcc/d/ChangeLog:

	* typeinfo.cc (TypeInfoVisitor::internal_reference): Call
	d_comdat_linkage on generated decl.
parent 1165109b
2020-03-31 Iain Buclaw <ibuclaw@gdcproject.org>
* typeinfo.cc (TypeInfoVisitor::internal_reference): Call
d_comdat_linkage on generated decl.
2020-03-22 Iain Buclaw <ibuclaw@gdcproject.org> 2020-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/93038 PR d/93038
......
...@@ -358,7 +358,7 @@ class TypeInfoVisitor : public Visitor ...@@ -358,7 +358,7 @@ class TypeInfoVisitor : public Visitor
DECL_EXTERNAL (decl) = 0; DECL_EXTERNAL (decl) = 0;
TREE_PUBLIC (decl) = 1; TREE_PUBLIC (decl) = 1;
DECL_VISIBILITY (decl) = VISIBILITY_INTERNAL; DECL_VISIBILITY (decl) = VISIBILITY_INTERNAL;
DECL_COMDAT (decl) = 1; d_comdat_linkage (decl);
d_pushdecl (decl); d_pushdecl (decl);
return decl; return decl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment