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 | 82c80a59ee7c0f8a474cf9e4d195eef2417d127b (patch) | |
| tree | ecfde24b9542ba3828a91282bd311c34de250ab6 /clang | |
| parent | 97fb3e53239702598e97bc7ee358a56a5fbf117a (diff) | |
| download | bcm5719-llvm-82c80a59ee7c0f8a474cf9e4d195eef2417d127b.tar.gz bcm5719-llvm-82c80a59ee7c0f8a474cf9e4d195eef2417d127b.zip | |
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
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 240922afd86..6d2f2301ba4 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/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()) |

