diff options
| author | Alexis Hunt <alercah@gmail.com> | 2011-05-09 18:22:59 +0000 |
|---|---|---|
| committer | Alexis Hunt <alercah@gmail.com> | 2011-05-09 18:22:59 +0000 |
| commit | f479f1b7e4102072e3c6899b4f9c9122543ae880 (patch) | |
| tree | 0bb3531526d9896503bd0d62943d339ce01b39cb /clang/lib/CodeGen | |
| parent | 5dc19f916c2ceeb301ed145c7fbcf5f99b7a85c7 (diff) | |
| download | bcm5719-llvm-f479f1b7e4102072e3c6899b4f9c9122543ae880.tar.gz bcm5719-llvm-f479f1b7e4102072e3c6899b4f9c9122543ae880.zip | |
Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and
modify the semantics slightly to accomodate default constructors (I
hope).
llvm-svn: 131087
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 29c76887a7c..d8da642a6b3 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -642,7 +642,7 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) { if (const RecordType *RT = CGF.getContext() .getBaseElementType(ElementType)->getAs<RecordType>()) { const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl()); - hasNonTrivialCXXConstructor = !RD->hasTrivialConstructor(); + hasNonTrivialCXXConstructor = !RD->hasTrivialDefaultConstructor(); } // FIXME: were we intentionally ignoring address spaces and GC attributes? diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 6ee9bc1033e..cef5d916ff9 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -738,7 +738,7 @@ static void EmitNewInitializer(CodeGenFunction &CGF, const CXXNewExpr *E, if (E->isArray()) { if (CXXConstructorDecl *Ctor = E->getConstructor()) { bool RequiresZeroInitialization = false; - if (Ctor->getParent()->hasTrivialConstructor()) { + if (Ctor->getParent()->hasTrivialDefaultConstructor()) { // If new expression did not specify value-initialization, then there // is no initialization. if (!E->hasInitializer() || Ctor->getParent()->isEmpty()) diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 5b0d41e776f..5fc57591ded 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -292,7 +292,7 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP, const CXXRecordDecl *classDecl = IVART->getAsCXXRecordDecl(); if (PID->getGetterCXXConstructor() && - classDecl && !classDecl->hasTrivialConstructor()) { + classDecl && !classDecl->hasTrivialDefaultConstructor()) { ReturnStmt *Stmt = new (getContext()) ReturnStmt(SourceLocation(), PID->getGetterCXXConstructor(), |

