summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-05 16:18:08 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-05 16:18:08 +0000
commitaf77cd220a45ae9445b5e6d464d8dd019af6d2ea (patch)
tree19be86058b2addd6330cde17b74589d3acf94494 /clang/lib/CodeGen
parent994da1a4791e8446cab7bd6cc427afdc0dd7759a (diff)
downloadbcm5719-llvm-af77cd220a45ae9445b5e6d464d8dd019af6d2ea.tar.gz
bcm5719-llvm-af77cd220a45ae9445b5e6d464d8dd019af6d2ea.zip
Revert r95363 and r95375, which broke self-host.
llvm-svn: 95389
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index a2073e66738..a358b54fa3c 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -675,19 +675,9 @@ public:
if (!E->getConstructor()->isTrivial())
return 0;
- // FIXME: We should not have to call getBaseElementType here.
- QualType Ty = CGM.getContext().getBaseElementType(E->getType());
-
- const CXXRecordDecl *RD =
- cast<CXXRecordDecl>(Ty->getAs<RecordType>()->getDecl());
-
- // If the class doesn't have a trivial destructor, we can't emit it as a
- // constant expr.
- if (!RD->hasTrivialDestructor())
- return 0;
-
// Only copy and default constructors can be trivial.
+ QualType Ty = E->getType();
if (E->getNumArgs()) {
assert(E->getNumArgs() == 1 && "trivial ctor with > 1 argument");
OpenPOWER on IntegriCloud