From 996795b0dda1c961de31430b2113f9e43634527f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 28 Jun 2006 23:17:24 +0000 Subject: Use hidden visibility to make symbols in an anonymous namespace get dropped. This shrinks libllvmgcc.dylib another 67K llvm-svn: 28975 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp | 5 +++-- llvm/lib/Analysis/ScalarEvolution.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Analysis') diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index fa4a029648f..57eda0fd40e 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -23,6 +23,7 @@ #include "llvm/Pass.h" #include "llvm/Target/TargetData.h" #include "llvm/Support/GetElementPtrTypeIterator.h" +#include "llvm/Support/Visibility.h" #include using namespace llvm; @@ -32,7 +33,7 @@ namespace { /// implementations, in that it does not chain to a previous analysis. As /// such it doesn't follow many of the rules that other alias analyses must. /// - struct NoAA : public ImmutablePass, public AliasAnalysis { + struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); } @@ -84,7 +85,7 @@ namespace { /// BasicAliasAnalysis - This is the default alias analysis implementation. /// Because it doesn't chain to a previous alias analysis (like -no-aa), it /// derives from the NoAA class. - struct BasicAliasAnalysis : public NoAA { + struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA { AliasResult alias(const Value *V1, unsigned V1Size, const Value *V2, unsigned V2Size); diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index c6e32c53ab7..a83d2ee1c69 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -69,9 +69,10 @@ #include "llvm/Assembly/Writer.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/CFG.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/ConstantRange.h" #include "llvm/Support/InstIterator.h" -#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Visibility.h" #include "llvm/ADT/Statistic.h" #include #include @@ -393,7 +394,7 @@ namespace { /// SCEVComplexityCompare - Return true if the complexity of the LHS is less /// than the complexity of the RHS. This comparator is used to canonicalize /// expressions. - struct SCEVComplexityCompare { + struct VISIBILITY_HIDDEN SCEVComplexityCompare { bool operator()(SCEV *LHS, SCEV *RHS) { return LHS->getSCEVType() < RHS->getSCEVType(); } @@ -1062,7 +1063,7 @@ SCEVHandle SCEVUnknown::get(Value *V) { /// evolution code. /// namespace { - struct ScalarEvolutionsImpl { + struct VISIBILITY_HIDDEN ScalarEvolutionsImpl { /// F - The function we are analyzing. /// Function &F; -- cgit v1.2.3