r174341 - Test for virtual instead of pure here. It has the exact same effect, and John

Nick Lewycky nicholas at mxc.ca
Mon Feb 4 22:20:32 PST 2013


Author: nicholas
Date: Tue Feb  5 00:20:31 2013
New Revision: 174341

URL: http://llvm.org/viewvc/llvm-project?rev=174341&view=rev
Log:
Test for virtual instead of pure here. It has the exact same effect, and John
claims it will improve performance.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=174341&r1=174340&r2=174341&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Feb  5 00:20:31 2013
@@ -11192,7 +11192,7 @@ void Sema::MarkDeclRefReferenced(DeclRef
   // if it's a qualified reference.
   bool OdrUse = true;
   if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(E->getDecl()))
-    if (Method->isPure())
+    if (Method->isVirtual())
       OdrUse = false;
   MarkExprReferenced(*this, E->getLocation(), E->getDecl(), E, OdrUse);
 }





More information about the cfe-commits mailing list