HomePhabricator

[libc++] Disentangle the 3 implementations of type_info

Authored by ldionne on Feb 1 2019, 12:00 PM.

Description

[libc++] Disentangle the 3 implementations of type_info

Summary:
We currently have effectively 3 implementations of type_info: one for
the Microsoft ABI, one that does not assume that there's a unique copy
of each RTTI in a progran, and one that assumes a unique copy.

Those 3 implementations are entangled into the same class with nested
ifdefs, which makes it very difficult to understand. Furthermore, the
benefit of doing this is rather small since the code that is duplicated
across implementations is just a couple of trivial lines.

This patch stamps out the 3 versions of type_info explicitly to increase
readability. It also explains what's going on with short comments, because
it's far from obvious.

Reviewers: EricWF, mclow.lists

Subscribers: christof, jkorous, dexonsmith

Differential Revision: https://reviews.llvm.org/D57606

llvm-svn: 352905

Details

Committed
ldionneFeb 1 2019, 12:00 PM
Differential Revision
D57606: [libc++] Disentangle the 3 implementations of type_info
Parents
rG8b323f53eb40: [InstCombine] Extra null-checking on TFE/LWE support
Branches
Unknown
Tags
Unknown