diff options
author | dim <dim@FreeBSD.org> | 2012-05-03 16:53:59 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-05-03 16:53:59 +0000 |
commit | 822bde9df508e0b9afac5e581b0d6ab403417a28 (patch) | |
tree | 2e51705e103e92c7be1b21e8bd8ffd5b5d0e4d52 /lib/Index/EntityImpl.h | |
parent | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (diff) | |
download | FreeBSD-src-822bde9df508e0b9afac5e581b0d6ab403417a28.zip FreeBSD-src-822bde9df508e0b9afac5e581b0d6ab403417a28.tar.gz |
Vendor import of clang release_31 branch r155985:
http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985
Diffstat (limited to 'lib/Index/EntityImpl.h')
-rw-r--r-- | lib/Index/EntityImpl.h | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/lib/Index/EntityImpl.h b/lib/Index/EntityImpl.h deleted file mode 100644 index 6d6a0c6..0000000 --- a/lib/Index/EntityImpl.h +++ /dev/null @@ -1,71 +0,0 @@ -//===--- EntityImpl.h - Internal Entity implementation---------*- C++ -*-=====// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Internal implementation for the Entity class -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_INDEX_ENTITYIMPL_H -#define LLVM_CLANG_INDEX_ENTITYIMPL_H - -#include "clang/Index/Entity.h" -#include "clang/AST/DeclarationName.h" -#include "llvm/ADT/FoldingSet.h" -#include "llvm/ADT/StringSet.h" - -namespace clang { - -namespace idx { - class ProgramImpl; - -class EntityImpl : public llvm::FoldingSetNode { - Entity Parent; - DeclarationName Name; - - /// \brief Identifier namespace. - unsigned IdNS; - - /// \brief If Name is a selector, this keeps track whether it's for an - /// instance method. - bool IsObjCInstanceMethod; - -public: - EntityImpl(Entity parent, DeclarationName name, unsigned idNS, - bool isObjCInstanceMethod) - : Parent(parent), Name(name), IdNS(idNS), - IsObjCInstanceMethod(isObjCInstanceMethod) { } - - /// \brief Find the Decl that can be referred to by this entity. - Decl *getDecl(ASTContext &AST); - - /// \brief Get an Entity associated with the given Decl. - /// \returns Null if an Entity cannot refer to this Decl. - static Entity get(Decl *D, Program &Prog, ProgramImpl &ProgImpl); - static Entity get(StringRef Name, Program &Prog, ProgramImpl &ProgImpl); - - std::string getPrintableName(); - - void Profile(llvm::FoldingSetNodeID &ID) const { - Profile(ID, Parent, Name, IdNS, IsObjCInstanceMethod); - } - static void Profile(llvm::FoldingSetNodeID &ID, Entity Parent, - DeclarationName Name, unsigned IdNS, - bool isObjCInstanceMethod) { - ID.AddPointer(Parent.getAsOpaquePtr()); - ID.AddPointer(Name.getAsOpaquePtr()); - ID.AddInteger(IdNS); - ID.AddBoolean(isObjCInstanceMethod); - } -}; - -} // namespace idx - -} // namespace clang - -#endif |