summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-29 23:41:44 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-29 23:41:44 +0000
commit82c80a59ee7c0f8a474cf9e4d195eef2417d127b (patch)
treeecfde24b9542ba3828a91282bd311c34de250ab6 /clang
parent97fb3e53239702598e97bc7ee358a56a5fbf117a (diff)
downloadbcm5719-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.cpp3
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())
OpenPOWER on IntegriCloud