mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 17:28:30 +08:00
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
llvm-svn: 77546
This commit is contained in:
@@ -685,9 +685,6 @@ TagDecl* TagDecl::getDefinition(ASTContext& C) const {
|
||||
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())
|
||||
|
||||
Reference in New Issue
Block a user