summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-04-13 02:53:27 +0000
committerJohn McCall <rjmccall@apple.com>2012-04-13 02:53:27 +0000
commit7444639f2739905054ef37f3f100f4bad8810062 (patch)
treed0f20a4f92e45169ae0fe1cb55e64ad35010e65b /lib
parent95e7aaf46a28f972d730e5181bf9e2693a32c3ce (diff)
Fix a trivial oversight with apple-kext static local destructors
and add a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/CGDeclCXX.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp
index 99d50312b5..10f0b83e40 100644
--- a/lib/CodeGen/CGDeclCXX.cpp
+++ b/lib/CodeGen/CGDeclCXX.cpp
@@ -244,6 +244,7 @@ void CodeGenFunction::EmitCXXGlobalDtorRegistration(llvm::Constant *dtor,
if (CGM.getContext().getLangOpts().AppleKext) {
// Generate a global destructor entry.
CGM.AddCXXDtorEntry(dtor, addr);
+ return;
}
// Otherwise, we just use atexit.