summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-02-03 02:08:44 +0000
committerAnders Carlsson <andersca@mac.com>2011-02-03 02:08:44 +0000
commitbac84bef65868fbd1dc5db613a1d389e7322a253 (patch)
treee5e5a3b716d478de492760b477034ba4ad7ec30e /clang/lib/Sema
parent50a2e0e894083f57f5635155ed79136363a9a442 (diff)
downloadbcm5719-llvm-bac84bef65868fbd1dc5db613a1d389e7322a253.tar.gz
bcm5719-llvm-bac84bef65868fbd1dc5db613a1d389e7322a253.zip
Don't try to mark virtual members referenced for classes where the key function
is not defined in the current translation unit. Doing so lead to compile errors such as PR9114. Instead, when CodeGen is building the vtable, don't try to emit a definition for functions that aren't marked used in the current translation unit. Fixes PR9114. llvm-svn: 124768
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index b4c375d638a..0565a7fef90 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -7118,13 +7118,6 @@ bool Sema::DefineUsedVTables() {
switch (KeyFunction->getTemplateSpecializationKind()) {
case TSK_Undeclared:
case TSK_ExplicitSpecialization:
- // The key function is in another translation unit. Mark all of the
- // virtual members of this class as referenced so that we can build a
- // vtable anyway (in order to do devirtualization when optimizations
- // are turned on for example.
- MarkVirtualMembersReferenced(Loc, Class);
- continue;
-
case TSK_ExplicitInstantiationDeclaration:
// The key function is in another translation unit.
continue;
OpenPOWER on IntegriCloud