[cfe-commits] r77546 - /cfe/trunk/lib/AST/Decl.cpp
Douglas Gregor
dgregor at apple.com
Wed Jul 29 16:41:44 PDT 2009
Author: dgregor
Date: Wed Jul 29 18:41:44 2009
New Revision: 77546
URL: http://llvm.org/viewvc/llvm-project?rev=77546&view=rev
Log:
There's no point in going through the getAs<TagType> stuff to find the definition of a tag, since tags rarely have more than one or two declarations
Modified:
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=77546&r1=77545&r2=77546&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Wed Jul 29 18:41:44 2009
@@ -685,9 +685,6 @@
if (isDefinition())
return const_cast<TagDecl *>(this);
- if (TagType *TagT = const_cast<TagType *>(TypeForDecl->getAs<TagType>()))
- return TagT->getDecl()->isDefinition()? TagT->getDecl() : 0;
-
for (redecl_iterator R = redecls_begin(), REnd = redecls_end();
R != REnd; ++R)
if (R->isDefinition())
More information about the cfe-commits
mailing list