diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-23 20:24:38 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-23 20:24:38 +0000 |
commit | 8cf0f52037e0c4bf656953ae63a07e8156aeb5fb (patch) | |
tree | 2d2056eeb0c2fc1741a8e6619517758a9603200c /lib/AST/DeclBase.cpp | |
parent | 7f88c0133272129111ec32d7aa5eacf6e685c6fc (diff) |
Move definition of template <typename T> void Decl::dropAttr
to its header to avoid an explicit instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 575b82d9af..1766d39c14 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -571,24 +571,6 @@ Decl *Decl::castFromDeclContext (const DeclContext *D) { } } -template <typename T> -void Decl::dropAttr() { - if (!HasAttrs) return; - AttrVec &Attrs = getASTContext().getDeclAttrs(this); - for (unsigned i = 0, e = Attrs.size(); i != e; /* in loop */) { - if (isa<T>(Attrs[i])) { - Attrs.erase(Attrs.begin() + i); - --e; - } - else - ++i; - } - if (Attrs.empty()) - HasAttrs = false; -} -// Force instantiation for WeakImportAttr which gets used. -template void Decl::dropAttr<WeakImportAttr>(); - DeclContext *Decl::castToDeclContext(const Decl *D) { Decl::Kind DK = D->getKind(); switch(DK) { |