diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-07-29 23:41:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-07-29 23:41:44 +0000 |
commit | e5bb6d49522f5119740a2c87e466725300fee88f (patch) | |
tree | 87490ee40580e1500c62f0f312955bb246a979a1 /lib/AST/Decl.cpp | |
parent | b325146ac7f8e197b6d12aa5c11a3f0a7244e870 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 240922afd8..6d2f2301ba 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -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()) |