summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGVTables.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-02-06 18:31:40 +0000
committerAnders Carlsson <andersca@mac.com>2011-02-06 18:31:40 +0000
commit14e82fd91c6d5041aa840574143521d244f185cd (patch)
tree8a0f4a9734a6085ec451e9c2f85becae35533471 /lib/CodeGen/CGVTables.h
parent84c49e4e4baeb4c30251fd72220efb344b033cf0 (diff)
When building with optimizations, emit thunks with available_externally linkage so devirtualized function calls can also be de-thunked.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.h')
-rw-r--r--lib/CodeGen/CGVTables.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/CodeGen/CGVTables.h b/lib/CodeGen/CGVTables.h
index 3aee49372d..7c119fa422 100644
--- a/lib/CodeGen/CGVTables.h
+++ b/lib/CodeGen/CGVTables.h
@@ -183,8 +183,15 @@ class CodeGenVTables {
void ComputeMethodVTableIndices(const CXXRecordDecl *RD);
/// EmitThunk - Emit a single thunk.
- void EmitThunk(GlobalDecl GD, const ThunkInfo &Thunk);
-
+ void EmitThunk(GlobalDecl GD, const ThunkInfo &Thunk,
+ bool UseAvailableExternallyLinkage);
+
+ /// MaybeEmitThunkAvailableExternally - Try to emit the given thunk with
+ /// available_externally linkage to allow for inlining of thunks.
+ /// This will be done iff optimizations are enabled and the member function
+ /// doesn't contain any incomplete types.
+ void MaybeEmitThunkAvailableExternally(GlobalDecl GD, const ThunkInfo &Thunk);
+
/// ComputeVTableRelatedInformation - Compute and store all vtable related
/// information (vtable layout, vbase offset offsets, thunks etc) for the
/// given record decl.