]> granicus.if.org Git - clang/commit
Lazily declare default constructors. We now delay the construction of
authorDouglas Gregor <dgregor@apple.com>
Sat, 3 Jul 2010 00:47:00 +0000 (00:47 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 3 Jul 2010 00:47:00 +0000 (00:47 +0000)
commit1827403a7138946305c0058f262e02b595cf882f
treecb23c44bce8e9321a07e726c5c2477bf0b66821c
parent225843186e3972ce798d3de00f86da9008b15a0e
Lazily declare default constructors. We now delay the construction of
declarations for implicit default constructors, copy constructors,
copy assignment operators, and destructors. On a "simple" translation
unit that includes a bunch of C++ standard library headers, we
generate relatively few of these implicit declarations now:

  4/159 implicit default constructors created
  18/236 implicit copy constructors created
  70/241 implicit copy assignment operators created
  0/173 implicit destructors created

And, on this translation unit, this optimization doesn't really
provide any benefit. I'll do some more performance measurements soon,
but this completes the implementation work for <rdar://problem/8151045>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTContext.h
include/clang/AST/DeclCXX.h
lib/AST/ASTContext.cpp
lib/AST/DeclBase.cpp
lib/AST/DeclCXX.cpp
lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriterDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaLookup.cpp