diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-05 16:18:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-05 16:18:08 +0000 |
commit | 90c1c58aa72fecb8c3211aa25d0ef726ca6bf876 (patch) | |
tree | c1d5aab7ce0a6a6d68149c9d85b73b7f52ba61df /lib/CodeGen/CGExprConstant.cpp | |
parent | 67fa05b9ed29923b7b905a09cfb95c2ac91b5835 (diff) |
Revert r95363 and r95375, which broke self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95389 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index a2073e6673..a358b54fa3 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/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"); |