llvm-project/clang/lib/AST
Rafael Espindola 1e4df92f49 Add support for putting constructors and destructos in explicit comdats.
There are situations when clang knows that the C1 and C2 constructors
or the D1 and D2 destructors are identical. We already optimize some
of these cases, but cannot optimize it when the GlobalValue is
weak_odr.

The problem with weak_odr is that an old TU seeing the same code will
have a C1 and a C2 comdat with the corresponding symbols. We cannot
suddenly start putting the C2 symbol in the C1 comdat as we cannot
guarantee that the linker will not pick a .o with only C1 in it.

The solution implemented by GCC is to expand the ABI to have a comdat
whose name uses a C5/D5 suffix and always has both symbols. That is
what this patch implements.

llvm-svn: 217874
2014-09-16 15:18:21 +00:00
..
APValue.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 06:28:36 +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 Use range based for loops to avoid needing to re-mention SmallPtrSet size. 2014-08-25 04:15:02 +00:00
ASTDiagnostic.cpp Refactor one of the larger functions for Type Diffing into smaller functions. 2014-08-27 06:24:47 +00:00
ASTDumper.cpp Don't print 'NULL TYPE' when dumping a delegating constructor. 2014-09-12 21:20:53 +00:00
ASTImporter.cpp unique_ptrify SourceManager::createFileID 2014-08-29 07:59:55 +00:00
ASTTypeTraits.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
AttrImpl.cpp Refactor the Microsoft inheritance attribute handling so that it no longer has special treatment. Also fixes a minor bug where the attributes were being parsed as though they were GNU-style attributes when they were in fact keyword attributes. 2013-12-18 23:44:18 +00:00
CMakeLists.txt MS ABI: Don't use the Itanium scheme for numbering lambdas 2014-08-22 04:22:50 +00:00
CXXABI.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CXXInheritance.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
Comment.cpp Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. 2014-08-30 16:55:39 +00:00
CommentBriefParser.cpp Some refactoring in my patch on document 2013-03-02 02:39:57 +00:00
CommentCommandTraits.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
CommentLexer.cpp Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already. 2014-08-30 16:55:52 +00:00
CommentParser.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
CommentSema.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
Decl.cpp patch to add missing warning on sizeof wrong parameter 2014-09-12 18:44:36 +00:00
DeclBase.cpp [modules] When performing a lookup into a namespace, ensure that any later 2014-08-13 01:23:33 +00:00
DeclCXX.cpp [modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes 2014-09-03 23:11:22 +00:00
DeclFriend.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +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. Change to method lookup rules to look 2014-08-27 20:34:29 +00:00
DeclOpenMP.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
DeclPrinter.cpp Pretty print attributes associated with record declarations. 2014-09-15 16:45:30 +00:00
DeclTemplate.cpp Convert some function arguments to use ArrayRef. 2014-06-26 04:58:53 +00:00
DeclarationName.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
Expr.cpp Range'ify some for loops over RecordDecl::fields() 2014-08-21 16:06:57 +00:00
ExprCXX.cpp [C++11] Support for capturing of variable length arrays in lambda expression. 2014-08-28 04:28:19 +00:00
ExprClassification.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
ExprConstant.cpp Reject a slightly-sneaky way to perform a read of mutable state from within a 2014-09-16 01:24:02 +00:00
ExternalASTSource.cpp Move virtual methods out of line. 2014-05-21 14:19:22 +00:00
InheritViz.cpp Refer to error_code with the std prefix. 2014-06-12 20:37:59 +00:00
ItaniumCXXABI.cpp MS ABI: Don't use the Itanium scheme for numbering lambdas 2014-08-22 04:22:50 +00:00
ItaniumMangle.cpp Add support for putting constructors and destructos in explicit comdats. 2014-09-16 15:18:21 +00:00
Makefile
Mangle.cpp [C++11] Replacing FunctionProtoType iterators param_type_begin() and param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops. 2014-03-17 15:23:01 +00:00
MicrosoftCXXABI.cpp MS ABI: Don't use the Itanium scheme for numbering lambdas 2014-08-22 04:22:50 +00:00
MicrosoftMangle.cpp Add support for putting constructors and destructos in explicit comdats. 2014-09-16 15:18:21 +00:00
NSAPI.cpp Objective-C modernization. Convert -initWithUTF8String messaging 2014-08-25 20:22:25 +00:00
NestedNameSpecifier.cpp Simplify memory management in NestedNameSpecifierLocBuilder. 2014-07-16 18:18:13 +00:00
ParentMap.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
RawCommentList.cpp Comment parsing: when comment ranges are deserialized from multiple modules, 2014-03-27 15:40:39 +00:00
RecordLayout.cpp CXXInfo memory should be released after calling the destructor 2014-05-24 07:19:25 +00:00
RecordLayoutBuilder.cpp MS ABI: Consider alignment attributes on typedefs for layout 2014-07-30 01:30:47 +00:00
SelectorLocationsKind.cpp
Stmt.cpp [AArch64, inline-asm] Improve diagnostic that is printed when the size of a 2014-08-22 06:05:21 +00:00
StmtIterator.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
StmtPrinter.cpp [C++11] Support for capturing of variable length arrays in lambda expression. 2014-08-28 04:28:19 +00:00
StmtProfile.cpp [C++11] Support for capturing of variable length arrays in lambda expression. 2014-08-28 04:28:19 +00:00
StmtViz.cpp
TemplateBase.cpp Added the pack_elements range accessor. Refactoring some for loops to use range-based for loops instead. No functional changes intended. 2014-07-15 21:32:31 +00:00
TemplateName.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
Type.cpp C++1y is now C++14! 2014-08-19 15:55:55 +00:00
TypeLoc.cpp [C++11] Use 'nullptr'. AST edition. 2014-05-12 05:36:57 +00:00
TypePrinter.cpp Cleanup comparisons to VariableArrayType::Static for non-VLAs 2014-07-19 02:13:40 +00:00
VTTBuilder.cpp [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. 2014-03-13 15:41:46 +00:00
VTableBuilder.cpp MS ABI: The latest VC "14" CTP implements deleted virtual functions 2014-09-12 04:38:08 +00:00