mozilla/rust — pull request #14935 by michaelwoerister (2014-06-16 16:03:40+00:00)
Title: debuginfo: Correctly handle indirectly recursive types

So far handling some indirectly recursive types, such as pointer types, has relied on LLVM metadata uniquing in a very implicit way. This could cause some inconsistencies in the debuginfo, and sometimes to hard to trace LLVM assertions.
With this commit unique type IDs and the TypeMap are used to explicitly make sure that no inconsistencies exist, and, if in the future some regression re-introduces one, give a better error message instead of the hard-to-interpret LLVM error.

This should fix issue #14871.