GabrielDosReis / ipr

Compiler-neutral Internal Program Representation for C++
BSD 3-Clause "New" or "Revised" License
222 stars 23 forks source link

Fix duplicate linkage nodes #167

Closed Xazax-hun closed 3 years ago

Xazax-hun commented 3 years ago

Previously, we picked the most general unary_compare overload that compared the addess of Linkage to Linkage::rep. As a result, those never compared equal and we ended up creating a new node for linkage each time Lexicon::cxx_linkage was called. This patch adds an overload to resolve this problem.

Xazax-hun commented 3 years ago

Interestingly, gcc disagrees with clang and msvc whether this code should compile. I'll try to work this around in a moment.