diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-06 23:38:16 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-06 23:38:16 +0000 |
commit | 9301b24c0a4ed6eb320c9bbd9bc547e11d57622e (patch) | |
tree | 688ba4e46fd294e8c3155fffb0035824e8420968 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 88fae6f9c966353ca94a66708fcb16bd0ab22b68 (diff) | |
download | bcm5719-llvm-9301b24c0a4ed6eb320c9bbd9bc547e11d57622e.tar.gz bcm5719-llvm-9301b24c0a4ed6eb320c9bbd9bc547e11d57622e.zip |
Patch toward synthesizing copy constructors.
Work in progress.
llvm-svn: 78355
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 249764e9d99..8e53651c8e6 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -645,7 +645,11 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction(const char *MangledName, else if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(FD)) { const CXXRecordDecl *ClassDecl = cast<CXXRecordDecl>(CD->getDeclContext()); - if (!ClassDecl->hasUserDeclaredConstructor()) + if (CD->isCopyConstructor(getContext())) { + if (!ClassDecl->hasUserDeclaredCopyConstructor()) + DeferredDeclsToEmit.push_back(D); + } + else if (!ClassDecl->hasUserDeclaredConstructor()) DeferredDeclsToEmit.push_back(D); } } |