This is an archive of the discontinued LLVM Phabricator instance.

[ObjC] Wrap namespace-global structure in an anonymous namespace to avoid ODR violations
ClosedPublic

Authored by davide on Jul 14 2020, 11:13 AM.

Diff Detail

Event Timeline

davide created this revision.Jul 14 2020, 11:13 AM
teemperor accepted this revision.Jul 14 2020, 11:18 AM

This seems to resolve the -Wodr build issues from what I can see, so LGTM. I guess the next step is drawing straws to see who has to refactor this code into something readable...

This revision is now accepted and ready to land.Jul 14 2020, 11:18 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2020, 11:26 AM
shafik added a subscriber: shafik.Jul 14 2020, 2:21 PM

It does indeed solve the immediate problem but if those namespaces aren't really meant to be shared across translation units they should have different names but that is for another PR.