From 11289f42807681deee5551c40fe1a4282d54c86a Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 9 Sep 2009 15:08:12 +0000 Subject: Remove tabs, and whitespace cleanups. llvm-svn: 81346 --- clang/lib/Index/Entity.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'clang/lib/Index/Entity.cpp') diff --git a/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp index 245fc9a5551..77d7a84da4d 100644 --- a/clang/lib/Index/Entity.cpp +++ b/clang/lib/Index/Entity.cpp @@ -41,10 +41,10 @@ class EntityGetter : public DeclVisitor { public: EntityGetter(Program &prog, ProgramImpl &progImpl) : Prog(prog), ProgImpl(progImpl) { } - + Entity VisitNamedDecl(NamedDecl *D); Entity VisitVarDecl(VarDecl *D); - Entity VisitFunctionDecl(FunctionDecl *D); + Entity VisitFunctionDecl(FunctionDecl *D); }; } @@ -80,12 +80,12 @@ Entity EntityGetter::VisitNamedDecl(NamedDecl *D) { // Treats other DeclarationNames as internal Decls for now.. if (LocalSel.isNull()) return Entity(D); - + Selector GlobSel = (uintptr_t)GlobalSelector::get(LocalSel, Prog).getAsOpaquePtr(); GlobName = DeclarationName(GlobSel); } - + assert(GlobName); unsigned IdNS = D->getIdentifierNamespace(); @@ -105,7 +105,7 @@ Entity EntityGetter::VisitNamedDecl(NamedDecl *D) { EntityImpl *New = new (Buf) EntityImpl(Parent, GlobName, IdNS, isObjCInstanceMethod); Entities.InsertNode(New, InsertPos); - + return Entity(New); } @@ -113,7 +113,7 @@ Entity EntityGetter::VisitVarDecl(VarDecl *D) { // If it's static it cannot be referred to by another translation unit. if (D->getStorageClass() == VarDecl::Static) return Entity(D); - + return VisitNamedDecl(D); } @@ -121,7 +121,7 @@ Entity EntityGetter::VisitFunctionDecl(FunctionDecl *D) { // If it's static it cannot be refered to by another translation unit. if (D->getStorageClass() == FunctionDecl::Static) return Entity(D); - + return VisitNamedDecl(D); } @@ -188,18 +188,18 @@ Entity::Entity(Decl *D) : Val(D->getCanonicalDecl()) { } Decl *Entity::getDecl(ASTContext &AST) const { if (isInvalid()) return 0; - + if (Decl *D = Val.dyn_cast()) // Check that the passed AST is actually the one that this Decl belongs to. return (&D->getASTContext() == &AST) ? D : 0; - + return Val.get()->getDecl(AST); } std::string Entity::getPrintableName() const { if (isInvalid()) return "<< Invalid >>"; - + if (Decl *D = Val.dyn_cast()) { if (NamedDecl *ND = dyn_cast(D)) return ND->getNameAsString(); @@ -219,7 +219,7 @@ Entity Entity::get(Decl *D, Program &Prog) { return EntityImpl::get(D, Prog, ProgImpl); } -unsigned +unsigned llvm::DenseMapInfo::getHashValue(Entity E) { return DenseMapInfo::getHashValue(E.getAsOpaquePtr()); } -- cgit v1.2.3