]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #37336 - michaelwoerister:debuginfo-type-ids, r=eddyb
authorJonathan Turner <jonathandturner@users.noreply.github.com>
Mon, 24 Oct 2016 22:41:29 +0000 (15:41 -0700)
committerGitHub <noreply@github.com>
Mon, 24 Oct 2016 22:41:29 +0000 (15:41 -0700)
debuginfo: Use TypeIdHasher for generating global debuginfo type IDs.

The only requirement for debuginfo type IDs is that they are globally unique. The `TypeIdHasher` (which is used for `std::intrinsic::type_id()` provides that, so we can get rid of some redundancy by re-using it for debuginfo. Values produced by the `TypeIdHasher` are also more stable than the current `UniqueTypeId` generation algorithm produces -- these incorporate the `NodeId`s, which is not good for incremental compilation.

@alexcrichton @eddyb : Could you take a look at the endianess adaptations that I made to the `TypeIdHasher`?

Also, are we sure that a 64 bit hash is wide enough for something that is supposed to be globally unique? For debuginfo I'm using 160 bits to make sure that we don't run into conflicts there.


Trivial merge