llvm-project/clang/lib/AST
Rafael Espindola 0e0d00976f Avoid computing the linkage too early. Don't invalidate it.
Before this patch we would compute the linkage lazily and cache it. When the
AST was modified in ways that could change the value, we would invalidate the
cache.

That was fairly brittle, since any code could ask for the a linkage before
the correct value was available.

We should change the API to one where the linkage is computed explicitly and
trying to get it when it is not available asserts.

This patch is a first step in that direction. We still compute the linkage
lazily, but instead of invalidating a cache, we assert that the AST
modifications didn't change the result.

llvm-svn: 176999
2013-03-14 03:07:35 +00:00
..
APValue.cpp Don't crash while printing APValues that are lvalues casted to a 2013-01-29 01:26:43 +00:00
ASTConsumer.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
ASTContext.cpp Remove a bogus assert so we don't crash in 2013-03-12 15:06:22 +00:00
ASTDiagnostic.cpp Update template diffing to handle template arguments that are declarations. 2013-02-27 01:41:53 +00:00
ASTDumper.cpp AST dumping: dump template instantiations only once 2013-02-21 22:01:10 +00:00
ASTImporter.cpp ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType. 2013-03-08 21:51:21 +00:00
AttrImpl.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
CMakeLists.txt Comment parsing: improve the fidelity of XML output for many block commands 2013-02-01 20:23:57 +00:00
CXXABI.h [Windows] Use thiscall as the default calling convention for class methods. PR12785 2012-07-12 09:50:54 +00:00
CXXInheritance.cpp Fix Cast 2013-01-15 22:09:40 +00:00
Comment.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
CommentBriefParser.cpp Some refactoring in my patch on document 2013-03-02 02:39:57 +00:00
CommentCommandTraits.cpp Comment parsing: add CommentOptions to allow specifying custom comment block commands 2013-02-22 14:21:27 +00:00
CommentLexer.cpp Comment parsing: refactor handling of command markers in AST 2013-03-04 23:06:15 +00:00
CommentParser.cpp doc parsing. Add @method and @callback for 2013-03-05 19:40:47 +00:00
CommentSema.cpp Documentation parsing. Some refactoring and code 2013-03-08 23:59:23 +00:00
Decl.cpp Avoid computing the linkage too early. Don't invalidate it. 2013-03-14 03:07:35 +00:00
DeclBase.cpp Add streamed versions of getQualifiedNameAsString. 2013-02-23 13:53:57 +00:00
DeclCXX.cpp Ignore visibility from enclosing template arguments 2013-02-21 23:42:58 +00:00
DeclFriend.cpp Added outer template parameter lists to friend type AST nodes. 2013-01-31 09:54:08 +00:00
DeclGroup.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
DeclObjC.cpp Objective-C: Fixes a comment. 2013-03-12 17:43:00 +00:00
DeclPrinter.cpp Fix empty declaration printing. 2013-02-25 18:40:11 +00:00
DeclTemplate.cpp Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList. 2013-02-22 15:46:01 +00:00
DeclarationName.cpp Don't include Type.h in DeclarationName.h. 2012-12-01 16:35:25 +00:00
DumpXML.cpp Revert r175912, "Add support for coldcc to clang" at John's request. 2013-02-23 00:06:18 +00:00
Expr.cpp Add streamed versions of getQualifiedNameAsString. 2013-02-23 13:53:57 +00:00
ExprCXX.cpp ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType. 2013-03-08 21:51:21 +00:00
ExprClassification.cpp Correctly classify T{} as an array temporary if T is an array of class type with nontrivial destructor. 2013-02-02 02:11:36 +00:00
ExprConstant.cpp Fix a crash in OpenCL code by using the proper (RHS) bit-width. 2013-01-29 15:09:40 +00:00
ExternalASTSource.cpp Simplify FindExternalVisibleDeclsByName by making it return a bool indicating 2013-02-07 03:30:24 +00:00
InheritViz.cpp Remove an unneeded const_cast 2013-01-14 00:25:25 +00:00
ItaniumCXXABI.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
ItaniumMangle.cpp Remove the hack that avoided mangling static functions in extern C contexts. 2013-02-23 00:26:28 +00:00
LambdaMangleContext.cpp ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType. 2013-03-08 21:51:21 +00:00
Makefile
Mangle.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
MicrosoftCXXABI.cpp Revert r163078 per chandlerc's request. 2012-09-04 17:18:12 +00:00
MicrosoftMangle.cpp Better support for constructors with -cxx-abi microsoft, partly fixes PR12784 2013-02-27 13:46:31 +00:00
NSAPI.cpp Use None rather than Optional<T>() where possible. 2013-02-21 01:47:18 +00:00
NestedNameSpecifier.cpp Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList. 2013-02-22 15:46:01 +00:00
ParentMap.cpp ParentMap: Restore the ability to update an existing map. 2012-10-06 01:19:36 +00:00
RawCommentList.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
RecordLayout.cpp First pass at abstracting out a class for the target C++ ABI. 2013-01-25 22:30:49 +00:00
RecordLayoutBuilder.cpp Abstract the behavior of when to use base-class tail padding. 2013-01-29 01:14:22 +00:00
SelectorLocationsKind.cpp Fix crash when using archaic protocol, rdar://10238337 2011-10-05 21:28:06 +00:00
Stmt.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
StmtIterator.cpp Support for C++11 (non-template) alias declarations. 2011-04-15 14:24:37 +00:00
StmtPrinter.cpp Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList. 2013-02-22 15:46:01 +00:00
StmtProfile.cpp Fix the AST representation for non-type template arguments to encode 2012-09-26 02:36:12 +00:00
StmtViz.cpp
TemplateBase.cpp Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList. 2013-02-22 15:46:01 +00:00
TemplateName.cpp Add quotation marks to template names in diagnostics. 2013-03-05 06:21:38 +00:00
Type.cpp Avoid computing the linkage too early. Don't invalidate it. 2013-03-14 03:07:35 +00:00
TypeLoc.cpp Rename TypeLoc's isType to isKind 2013-02-21 01:47:08 +00:00
TypePrinter.cpp Revert r175912, "Add support for coldcc to clang" at John's request. 2013-02-23 00:06:18 +00:00
VTTBuilder.cpp Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead. 2012-07-04 18:45:14 +00:00
VTableBuilder.cpp Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058 2013-02-13 08:37:51 +00:00