mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-12 12:48:59 +00:00
9ee97ce3b8
Instead of marking private symbols with internal_linkage (which leads to one copy per translation unit -- rather wasteful), use an ABI tag that gets rev'd with each libc++ version. That way, we know that we can't have name collisions between implementation-detail functions across libc++ versions, so we'll never violate the ODR. However, within a single program, each symbol still has a proper name with external linkage, which means that the linker is free to deduplicate symbols even across TUs. This actually means that we can guarantee that versions of libc++ can be mixed within the same program without ever having to take a code size hit, and without having to manually opt-in -- it should just work out of the box. Differential Revision: https://reviews.llvm.org/D127444