This patch adds builtin type traits to transform reference types. Specifically, it adds __add_lvalue_reference, __add_rvalue_reference, and __remove_reference. The first two builtins speed up builds by around 3x while the last builtin only sees small improvements (we may be able to optimize it more, though). Once added to the standard library, this should make libc++ (and other code) much faster to compile.
I tried to generalize as much of the builtin as possible so, the only functional difference between the three builtins is in the file BuildUnaryTransformType.