summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGVTables.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-11 03:25:57 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-11 03:25:57 +0000
commitd2c47bde3bc0c0debd8a9728781d3375efe22bc5 (patch)
treee1c731812888f1f798ab863f82a5d1f107a6aea1 /lib/CodeGen/CGVTables.h
parent6d576051b9ca56fe962077fb194ed2917539989a (diff)
Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.h')
-rw-r--r--lib/CodeGen/CGVTables.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/CodeGen/CGVTables.h b/lib/CodeGen/CGVTables.h
index abcafd6c9c..1d2e8c1e04 100644
--- a/lib/CodeGen/CGVTables.h
+++ b/lib/CodeGen/CGVTables.h
@@ -295,14 +295,9 @@ public:
CodeGenVTables(CodeGenModule &CGM)
: CGM(CGM) { }
- // isKeyFunctionInAnotherTU - True if this record has a key function and it is
- // in another translation unit.
- static bool isKeyFunctionInAnotherTU(ASTContext &Context,
- const CXXRecordDecl *RD) {
- assert (RD->isDynamicClass() && "Non dynamic classes have no key.");
- const CXXMethodDecl *KeyFunction = Context.getKeyFunction(RD);
- return KeyFunction && !KeyFunction->hasBody();
- }
+ /// \brief True if the VTable of this record must be emitted in the
+ /// translation unit.
+ bool ShouldEmitVTableInThisTU(const CXXRecordDecl *RD);
/// needsVTTParameter - Return whether the given global decl needs a VTT
/// parameter, which it does if it's a base constructor or destructor with