From: Benjamin Kramer Date: Sat, 28 Nov 2009 19:45:26 +0000 (+0000) Subject: Remove remaining VISIBILITY_HIDDEN from anonymous namespaces. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85b4521e34dcd4a0a4a1f0819e1123128e5a3125;p=clang Remove remaining VISIBILITY_HIDDEN from anonymous namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 9a2aae7f8b..d225d907c8 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -20,7 +20,6 @@ #include "llvm/Constants.h" #include "llvm/Function.h" #include "llvm/GlobalVariable.h" -#include "llvm/Support/Compiler.h" #include "llvm/Intrinsics.h" using namespace clang; using namespace CodeGen; @@ -30,7 +29,7 @@ using namespace CodeGen; //===----------------------------------------------------------------------===// namespace { -class VISIBILITY_HIDDEN AggExprEmitter : public StmtVisitor { +class AggExprEmitter : public StmtVisitor { CodeGenFunction &CGF; CGBuilderTy &Builder; llvm::Value *DestPtr; diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index 9e81e4fbea..83becd9442 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -18,7 +18,6 @@ #include "llvm/Constants.h" #include "llvm/Function.h" #include "llvm/ADT/SmallString.h" -#include "llvm/Support/Compiler.h" using namespace clang; using namespace CodeGen; @@ -29,7 +28,7 @@ using namespace CodeGen; typedef CodeGenFunction::ComplexPairTy ComplexPairTy; namespace { -class VISIBILITY_HIDDEN ComplexExprEmitter +class ComplexExprEmitter : public StmtVisitor { CodeGenFunction &CGF; CGBuilderTy &Builder; diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 54e3fa4744..9289f78d55 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -22,14 +22,12 @@ #include "llvm/Constants.h" #include "llvm/Function.h" #include "llvm/GlobalVariable.h" -#include "llvm/Support/Compiler.h" #include "llvm/Target/TargetData.h" using namespace clang; using namespace CodeGen; namespace { - -class VISIBILITY_HIDDEN ConstStructBuilder { +class ConstStructBuilder { CodeGenModule &CGM; CodeGenFunction *CGF; @@ -377,7 +375,7 @@ public: } }; -class VISIBILITY_HIDDEN ConstExprEmitter : +class ConstExprEmitter : public StmtVisitor { CodeGenModule &CGM; CodeGenFunction *CGF; diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 120db43d44..3cadb39e2f 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -24,7 +24,6 @@ #include "llvm/GlobalVariable.h" #include "llvm/Intrinsics.h" #include "llvm/Module.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/CFG.h" #include "llvm/Target/TargetData.h" #include @@ -45,7 +44,7 @@ struct BinOpInfo { }; namespace { -class VISIBILITY_HIDDEN ScalarExprEmitter +class ScalarExprEmitter : public StmtVisitor { CodeGenFunction &CGF; CGBuilderTy &Builder; diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index a26a697250..eb8a1dbb4d 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -13,7 +13,6 @@ #include "CodeGenModule.h" #include "CodeGenFunction.h" - #include "clang/AST/CXXInheritance.h" #include "clang/AST/RecordLayout.h" #include "llvm/ADT/DenseSet.h" @@ -23,8 +22,7 @@ using namespace clang; using namespace CodeGen; namespace { - -class VISIBILITY_HIDDEN VtableBuilder { +class VtableBuilder { public: /// Index_t - Vtable index type. typedef uint64_t Index_t; diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 4b7ab4f20e..eabdbbfde9 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -23,7 +23,6 @@ #include "clang/AST/ExprCXX.h" #include "clang/Basic/SourceManager.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/ErrorHandling.h" #include "CGVtable.h" diff --git a/lib/CodeGen/ModuleBuilder.cpp b/lib/CodeGen/ModuleBuilder.cpp index 1d8f31dd9b..017059df80 100644 --- a/lib/CodeGen/ModuleBuilder.cpp +++ b/lib/CodeGen/ModuleBuilder.cpp @@ -22,13 +22,11 @@ #include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Target/TargetData.h" -#include "llvm/Support/Compiler.h" #include "llvm/ADT/OwningPtr.h" using namespace clang; - namespace { - class VISIBILITY_HIDDEN CodeGeneratorImpl : public CodeGenerator { + class CodeGeneratorImpl : public CodeGenerator { Diagnostic &Diags; llvm::OwningPtr TD; ASTContext *Ctx; diff --git a/lib/Index/Analyzer.cpp b/lib/Index/Analyzer.cpp index 300a469220..fb3529d540 100644 --- a/lib/Index/Analyzer.cpp +++ b/lib/Index/Analyzer.cpp @@ -23,7 +23,6 @@ #include "clang/AST/DeclObjC.h" #include "clang/AST/ExprObjC.h" #include "llvm/ADT/SmallSet.h" -#include "llvm/Support/Compiler.h" using namespace clang; using namespace idx; @@ -33,7 +32,7 @@ namespace { // DeclEntityAnalyzer Implementation //===----------------------------------------------------------------------===// -class VISIBILITY_HIDDEN DeclEntityAnalyzer : public TranslationUnitHandler { +class DeclEntityAnalyzer : public TranslationUnitHandler { Entity Ent; TULocationHandler &TULocHandler; @@ -57,7 +56,7 @@ public: // RefEntityAnalyzer Implementation //===----------------------------------------------------------------------===// -class VISIBILITY_HIDDEN RefEntityAnalyzer : public TranslationUnitHandler { +class RefEntityAnalyzer : public TranslationUnitHandler { Entity Ent; TULocationHandler &TULocHandler; @@ -87,7 +86,7 @@ public: /// \brief Accepts an ObjC method and finds all message expressions that this /// method may respond to. -class VISIBILITY_HIDDEN RefSelectorAnalyzer : public TranslationUnitHandler { +class RefSelectorAnalyzer : public TranslationUnitHandler { Program &Prog; TULocationHandler &TULocHandler; @@ -219,7 +218,7 @@ public: /// \brief Accepts an ObjC message expression and finds all methods that may /// respond to it. -class VISIBILITY_HIDDEN MessageAnalyzer : public TranslationUnitHandler { +class MessageAnalyzer : public TranslationUnitHandler { Program &Prog; TULocationHandler &TULocHandler; diff --git a/lib/Index/DeclReferenceMap.cpp b/lib/Index/DeclReferenceMap.cpp index 366cf1b108..d6e30ab396 100644 --- a/lib/Index/DeclReferenceMap.cpp +++ b/lib/Index/DeclReferenceMap.cpp @@ -15,13 +15,12 @@ #include "clang/Index/DeclReferenceMap.h" #include "clang/Index/ASTLocation.h" #include "ASTVisitor.h" -#include "llvm/Support/Compiler.h" using namespace clang; using namespace idx; namespace { -class VISIBILITY_HIDDEN RefMapper : public ASTVisitor { +class RefMapper : public ASTVisitor { DeclReferenceMap::MapTy ⤅ public: diff --git a/lib/Index/ResolveLocation.cpp b/lib/Index/ResolveLocation.cpp index ed905f364f..c7379f7a83 100644 --- a/lib/Index/ResolveLocation.cpp +++ b/lib/Index/ResolveLocation.cpp @@ -19,14 +19,13 @@ #include "clang/AST/StmtVisitor.h" #include "clang/Lex/Lexer.h" #include "clang/Basic/SourceManager.h" -#include "llvm/Support/Compiler.h" using namespace clang; using namespace idx; namespace { /// \brief Base for the LocResolver classes. Mostly does source range checking. -class VISIBILITY_HIDDEN LocResolverBase { +class LocResolverBase { protected: ASTContext &Ctx; SourceLocation Loc; @@ -83,7 +82,7 @@ public: /// \brief Searches a statement for the ASTLocation that corresponds to a source /// location. -class VISIBILITY_HIDDEN StmtLocResolver : public LocResolverBase, +class StmtLocResolver : public LocResolverBase, public StmtVisitor { Decl * const Parent; @@ -100,7 +99,7 @@ public: /// \brief Searches a declaration for the ASTLocation that corresponds to a /// source location. -class VISIBILITY_HIDDEN DeclLocResolver : public LocResolverBase, +class DeclLocResolver : public LocResolverBase, public DeclVisitor { public: diff --git a/lib/Index/SelectorMap.cpp b/lib/Index/SelectorMap.cpp index 325b3711e8..0f11e31a0d 100644 --- a/lib/Index/SelectorMap.cpp +++ b/lib/Index/SelectorMap.cpp @@ -14,13 +14,12 @@ #include "clang/Index/SelectorMap.h" #include "ASTVisitor.h" -#include "llvm/Support/Compiler.h" using namespace clang; using namespace idx; namespace { -class VISIBILITY_HIDDEN SelMapper : public ASTVisitor { +class SelMapper : public ASTVisitor { SelectorMap::SelMethMapTy &SelMethMap; SelectorMap::SelRefMapTy &SelRefMap; diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index 4fc3a591d9..a64008ab18 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -24,7 +24,6 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringMap.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/MemoryBuffer.h" #include using namespace clang; @@ -286,7 +285,7 @@ SourceLocation PTHLexer::getSourceLocation() { /// to map from FileEntry objects managed by FileManager to offsets within /// the PTH file. namespace { -class VISIBILITY_HIDDEN PTHFileData { +class PTHFileData { const uint32_t TokenOff; const uint32_t PPCondOff; public: @@ -298,7 +297,7 @@ public: }; -class VISIBILITY_HIDDEN PTHFileLookupCommonTrait { +class PTHFileLookupCommonTrait { public: typedef std::pair internal_key_type; @@ -319,7 +318,7 @@ public: } }; -class VISIBILITY_HIDDEN PTHFileLookupTrait : public PTHFileLookupCommonTrait { +class PTHFileLookupTrait : public PTHFileLookupCommonTrait { public: typedef const FileEntry* external_key_type; typedef PTHFileData data_type; @@ -341,7 +340,7 @@ public: } }; -class VISIBILITY_HIDDEN PTHStringLookupTrait { +class PTHStringLookupTrait { public: typedef uint32_t data_type; @@ -598,7 +597,7 @@ PTHLexer *PTHManager::CreateLexer(FileID FID) { //===----------------------------------------------------------------------===// namespace { -class VISIBILITY_HIDDEN PTHStatData { +class PTHStatData { public: const bool hasStat; const ino_t ino; @@ -614,7 +613,7 @@ public: : hasStat(false), ino(0), dev(0), mode(0), mtime(0), size(0) {} }; -class VISIBILITY_HIDDEN PTHStatLookupTrait : public PTHFileLookupCommonTrait { +class PTHStatLookupTrait : public PTHFileLookupCommonTrait { public: typedef const char* external_key_type; // const char* typedef PTHStatData data_type; @@ -647,7 +646,7 @@ public: } }; -class VISIBILITY_HIDDEN PTHStatCache : public StatSysCallCache { +class PTHStatCache : public StatSysCallCache { typedef OnDiskChainedHashTable CacheTy; CacheTy Cache; diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp index d2f13f2479..0dbf37c830 100644 --- a/lib/Parse/ParseTemplate.cpp +++ b/lib/Parse/ParseTemplate.cpp @@ -16,7 +16,6 @@ #include "clang/Parse/DeclSpec.h" #include "clang/Parse/Scope.h" #include "clang/Parse/Template.h" -#include "llvm/Support/Compiler.h" using namespace clang; /// \brief Parse a template declaration, explicit instantiation, or @@ -34,7 +33,7 @@ Parser::ParseDeclarationStartingWithTemplate(unsigned Context, /// \brief RAII class that manages the template parameter depth. namespace { - class VISIBILITY_HIDDEN TemplateParameterDepthCounter { + class TemplateParameterDepthCounter { unsigned &Depth; unsigned AddedLevels; diff --git a/lib/Sema/CodeCompleteConsumer.cpp b/lib/Sema/CodeCompleteConsumer.cpp index a9d8301057..b0a7a664f5 100644 --- a/lib/Sema/CodeCompleteConsumer.cpp +++ b/lib/Sema/CodeCompleteConsumer.cpp @@ -17,7 +17,6 @@ #include "Sema.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringSwitch.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/raw_ostream.h" #include #include diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index a6bb401a88..34ab742958 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -24,8 +24,6 @@ #include "clang/Basic/PartialDiagnostic.h" #include "clang/Lex/Preprocessor.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Compiler.h" -#include // for std::equal #include #include @@ -41,7 +39,7 @@ namespace { /// contains any ill-formed subexpressions. For example, this will /// diagnose the use of local variables or parameters within the /// default argument expression. - class VISIBILITY_HIDDEN CheckDefaultArgumentVisitor + class CheckDefaultArgumentVisitor : public StmtVisitor { Expr *DefaultArg; Sema *S; @@ -1715,7 +1713,7 @@ void Sema::ActOnDefaultCtorInitializers(DeclPtrTy CDtorDecl) { namespace { /// PureVirtualMethodCollector - traverses a class and its superclasses /// and determines if it has any pure virtual methods. - class VISIBILITY_HIDDEN PureVirtualMethodCollector { + class PureVirtualMethodCollector { ASTContext &Context; public: @@ -1862,7 +1860,7 @@ bool Sema::RequireNonAbstractType(SourceLocation Loc, QualType T, } namespace { - class VISIBILITY_HIDDEN AbstractClassUsageDiagnoser + class AbstractClassUsageDiagnoser : public DeclVisitor { Sema &SemaRef; CXXRecordDecl *AbstractClass; diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 49050be8c5..6b1857a0dc 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -23,7 +23,6 @@ #include "clang/Basic/PartialDiagnostic.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Compiler.h" #include #include diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 2e4eed8b28..9dad2f63c8 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -20,7 +20,6 @@ #include "clang/Parse/Template.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/PartialDiagnostic.h" -#include "llvm/Support/Compiler.h" #include "llvm/ADT/StringExtras.h" using namespace clang; @@ -4854,7 +4853,7 @@ Sema::CheckTypenameType(NestedNameSpecifier *NNS, const IdentifierInfo &II, namespace { // See Sema::RebuildTypeInCurrentInstantiation - class VISIBILITY_HIDDEN CurrentInstantiationRebuilder + class CurrentInstantiationRebuilder : public TreeTransform { SourceLocation Loc; DeclarationName Entity; diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp index 06b2dec590..613ffde573 100644 --- a/lib/Sema/SemaTemplateDeduction.cpp +++ b/lib/Sema/SemaTemplateDeduction.cpp @@ -17,7 +17,6 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" #include "clang/Parse/DeclSpec.h" -#include "llvm/Support/Compiler.h" #include namespace clang { diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index dd92218c6b..623cde87a9 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -19,7 +19,6 @@ #include "clang/AST/DeclTemplate.h" #include "clang/Parse/DeclSpec.h" #include "clang/Basic/LangOptions.h" -#include "llvm/Support/Compiler.h" using namespace clang; @@ -492,7 +491,7 @@ bool Sema::isSFINAEContext() const { // Template Instantiation for Types //===----------------------------------------------------------------------===/ namespace { - class VISIBILITY_HIDDEN TemplateInstantiator + class TemplateInstantiator : public TreeTransform { const MultiLevelTemplateArgumentList &TemplateArgs; SourceLocation Loc; diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index bda19f1e98..ba75ee90b0 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -18,12 +18,11 @@ #include "clang/AST/Expr.h" #include "clang/Basic/PrettyStackTrace.h" #include "clang/Lex/Preprocessor.h" -#include "llvm/Support/Compiler.h" using namespace clang; namespace { - class VISIBILITY_HIDDEN TemplateDeclInstantiator + class TemplateDeclInstantiator : public DeclVisitor { Sema &SemaRef; DeclContext *Owner;