llvm-project/clang/lib/Serialization
Vassil Vassilev a4d7d783d0 [modules] Fix Decl's Used invariant.
The Decl::isUsed has a value for every decl. In non-module builds it is very
difficult (but possible) to break this invariant but when we walk up the redecl
chain we find the neccessary information.

When deserializing the decls from a module it is much more difficult to update
correctly this invariant. The patch centralizes the information whether a decl
is used in the canonical decl marking the entire entity as being used.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27401

Patch by Cristina Cristescu and me.

Thanks to Richard Smith who helped to debug and understand the issue!

Reviewed by Richard Smith.

llvm-svn: 267691
2016-04-27 10:46:06 +00:00
..
ASTCommon.cpp Revert 266186 as it breaks anything that includes type_traits on some platforms 2016-04-15 18:04:13 +00:00
ASTCommon.h [OPENMP] Parsing and Sema support for 'omp declare target' directive 2016-04-06 11:38:59 +00:00
ASTReader.cpp Revert 266186 as it breaks anything that includes type_traits on some platforms 2016-04-15 18:04:13 +00:00
ASTReaderDecl.cpp [modules] Fix Decl's Used invariant. 2016-04-27 10:46:06 +00:00
ASTReaderInternals.h Re-commit r246497 (and dependent changes r246524 and r246521), reverted in 2015-09-01 20:35:42 +00:00
ASTReaderStmt.cpp [OpenMP] Improve mappable expressions Sema. 2016-04-26 14:54:23 +00:00
ASTWriter.cpp [modules] Fix Decl's Used invariant. 2016-04-27 10:46:06 +00:00
ASTWriterDecl.cpp [modules] Fix Decl's Used invariant. 2016-04-27 10:46:06 +00:00
ASTWriterStmt.cpp [OpenMP] Improve mappable expressions Sema. 2016-04-26 14:54:23 +00:00
CMakeLists.txt Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
GeneratePCH.cpp Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
GlobalModuleIndex.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
Module.cpp [modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of 2016-04-14 00:29:55 +00:00
ModuleFileExtension.cpp Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
ModuleManager.cpp Fix use-after-free in ModuleManager 2015-10-21 23:12:45 +00:00
MultiOnDiskHashTable.h Roll-back r250822. 2015-10-20 13:23:58 +00:00