[cfe-commits] r99830 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Douglas Gregor
dgregor at apple.com
Mon Mar 29 13:28:52 PDT 2010
Author: dgregor
Date: Mon Mar 29 15:28:52 2010
New Revision: 99830
URL: http://llvm.org/viewvc/llvm-project?rev=99830&view=rev
Log:
Exit early from the simple form of Sema::RequireNonAbstractType(), for
a 2.47% speedup in 403.gcc.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=99830&r1=99829&r2=99830&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Mar 29 15:28:52 2010
@@ -1939,6 +1939,9 @@
bool Sema::RequireNonAbstractType(SourceLocation Loc, QualType T,
unsigned DiagID, AbstractDiagSelID SelID,
const CXXRecordDecl *CurrentRD) {
+ if (!getLangOptions().CPlusPlus)
+ return false;
+
if (SelID == -1)
return RequireNonAbstractType(Loc, T,
PDiag(DiagID), CurrentRD);
More information about the cfe-commits
mailing list