summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-02-02 23:12:46 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-02-02 23:12:46 +0000
commit0c12ed14293b62196d093c0e754166d3e9bb8eaa (patch)
tree02715b8d07e77eb1ee6c2e994ab0ed31f3b36615 /clang/lib
parent84ffdd9ba3039a23e5c034b7a43dcf5e5d84d5cf (diff)
downloadbcm5719-llvm-0c12ed14293b62196d093c0e754166d3e9bb8eaa.tar.gz
bcm5719-llvm-0c12ed14293b62196d093c0e754166d3e9bb8eaa.zip
-fapple-kext, elimination of all direct calls to virtual dtors.
llvm-svn: 124757
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index f4a45e4f610..905e1681500 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -796,6 +796,10 @@ void CodeGenFunction::EmitDestructorBody(FunctionArgList &Args) {
assert(Dtor->isImplicit() && "bodyless dtor not implicit");
// nothing to do besides what's in the epilogue
}
+ // -fapple-kext must inline any call to this dtor into
+ // the caller's body.
+ if (getContext().getLangOptions().AppleKext)
+ CurFn->addFnAttr(llvm::Attribute::AlwaysInline);
break;
}
OpenPOWER on IntegriCloud