Reland r267691 fixing PR27535.llvm-svn: 267882
Revert r267691, it caused PR27535.llvm-svn: 267744
[modules] Fix Decl's Used invariant.The Decl::isUsed has a value for every decl. In non-module builds it is verydifficult (but possible) to break this invariant but when we walk up the redeclchai
[modules] Fix Decl's Used invariant.The Decl::isUsed has a value for every decl. In non-module builds it is verydifficult (but possible) to break this invariant but when we walk up the redeclchain we find the neccessary information.When deserializing the decls from a module it is much more difficult to updatecorrectly this invariant. The patch centralizes the information whether a declis used in the canonical decl marking the entire entity as being used.Fixes https://llvm.org/bugs/show_bug.cgi?id=27401Patch by Cristina Cristescu and me.Thanks to Richard Smith who helped to debug and understand the issue!Reviewed by Richard Smith.llvm-svn: 267691
show more ...