diff options
author | John McCall <rjmccall@apple.com> | 2011-05-16 23:34:46 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-05-16 23:34:46 +0000 |
commit | 3217395e88e661e2a1c2b7eecb59629f67945b41 (patch) | |
tree | a7172bc71e613556a735b38a5561085fdd33f245 /lib/CodeGen/CGCXX.cpp | |
parent | cf34e757b968f1fa7965cab1464212ade4d9f991 (diff) |
Emit complete-object constructors for abstract classes in kext mode for
reasons that honestly really, really need to be looked into.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index f6fc202eaa..09e0aa63b6 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -176,8 +176,9 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl, void CodeGenModule::EmitCXXConstructors(const CXXConstructorDecl *D) { // The constructor used for constructing this as a complete class; // constucts the virtual bases, then calls the base constructor. - if (!D->getParent()->isAbstract()) { + if (!D->getParent()->isAbstract() || getLangOptions().AppleKext) { // We don't need to emit the complete ctor if the class is abstract. + // But kexts somehow manage to violate this assumption. EmitGlobal(GlobalDecl(D, Ctor_Complete)); } |