diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-02-14 00:55:17 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-02-14 00:55:17 +0000 |
commit | d3b4f0e27ffa8d73f8c69a717c39c39a4d47ff0c (patch) | |
tree | 3ef43fa5026d09a566d8e5600e07ea552391a8de /lib/Sema/SemaExpr.cpp | |
parent | 544450e449c2fa1af63199b047b2d378be1760ec (diff) |
When marking derived classes' virtual methods ODR-used in order to trigger
instantiation in order to permit devirtualization later in codegen, skip over
pure functions since those can't be devirtualization targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 191683d33d..b3ba2dc4ae 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -11179,7 +11179,7 @@ static void MarkExprReferenced(Sema &SemaRef, SourceLocation Loc, if (!MostDerivedClassDecl) return; CXXMethodDecl *DM = MD->getCorrespondingMethodInClass(MostDerivedClassDecl); - if (!DM) + if (!DM || DM->isPure()) return; SemaRef.MarkAnyDeclReferenced(Loc, DM, OdrUse); } |