Reapply r261657.
Remove an unnecessary workaround introduced in r259975. (NFC)

Now that LLVM r259973 allows replacing a temporary type with another
temporary we can rely on the original implementation.

It is possible for enums to be created as part of
their own declcontext. In this case a FwdDecl will be created
twice. This doesn't cause a problem because both FwdDecls are
entered into the ReplaceMap: finalize() will replace the first
FwdDecl with the second and then replace the second with
complete type.

Thanks to echristo for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261673 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 544b2b7bbae5f19aa31c3714b65c3f9cfacc63e3)
<rdar://problem/25078246>
1 file changed