Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K

llvm-svn: 28975
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 6e4460b..ec15b64 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -31,6 +31,7 @@
 #include "llvm/Target/TargetData.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/Visibility.h"
 #include "llvm/Target/TargetLowering.h"
 #include <algorithm>
 #include <iostream>
@@ -104,7 +105,7 @@
     }
   };
 
-  class LoopStrengthReduce : public FunctionPass {
+  class VISIBILITY_HIDDEN LoopStrengthReduce : public FunctionPass {
     LoopInfo *LI;
     ETForest *EF;
     ScalarEvolution *SE;
diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
index dab8084..eab6468 100644
--- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
@@ -21,6 +21,7 @@
 #include "llvm/Pass.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Target/TargetData.h"
+#include "llvm/Support/Visibility.h"
 using namespace llvm;
 
 namespace {
@@ -29,7 +30,7 @@
   /// LowerAllocations - Turn malloc and free instructions into %malloc and
   /// %free calls.
   ///
-  class LowerAllocations : public BasicBlockPass {
+  class VISIBILITY_HIDDEN LowerAllocations : public BasicBlockPass {
     Function *MallocFunc;   // Functions in the module we are processing
     Function *FreeFunc;     // Initialized by doInitialization
     bool LowerMallocArgToInteger;
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index f5bab8d..843c908 100644
--- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -28,9 +28,10 @@
 #include "llvm/Analysis/Dominators.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Transforms/Utils/PromoteMemToReg.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
 #include "llvm/Support/MathExtras.h"
-#include "llvm/Support/Debug.h"
+#include "llvm/Support/Visibility.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/StringExtras.h"
 #include <iostream>
@@ -42,7 +43,7 @@
   Statistic<> NumConverted("scalarrepl",
                            "Number of aggregates converted to scalar");
 
-  struct SROA : public FunctionPass {
+  struct VISIBILITY_HIDDEN SROA : public FunctionPass {
     bool runOnFunction(Function &F);
 
     bool performScalarRepl(Function &F);
diff --git a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
index 5bb7d46..7b00de6 100644
--- a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -24,13 +24,14 @@
 #include "llvm/Instructions.h"
 #include "llvm/Type.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Visibility.h"
 #include "llvm/ADT/Statistic.h"
 using namespace llvm;
 
 namespace {
   Statistic<> NumBroken("break-crit-edges", "Number of blocks inserted");
 
-  struct BreakCriticalEdges : public FunctionPass {
+  struct VISIBILITY_HIDDEN BreakCriticalEdges : public FunctionPass {
     virtual bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index 3188f12..dcad43f 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
@@ -41,6 +41,7 @@
 #include "llvm/Analysis/Dominators.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Visibility.h"
 #include "llvm/ADT/SetOperations.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/Statistic.h"
@@ -53,7 +54,7 @@
   Statistic<>
   NumNested("loopsimplify", "Number of nested loops split out");
 
-  struct LoopSimplify : public FunctionPass {
+  struct VISIBILITY_HIDDEN LoopSimplify : public FunctionPass {
     // AA - If we have an alias analysis object to update, this is it, otherwise
     // this is null.
     AliasAnalysis *AA;
diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index e433e6d..f748770 100644
--- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -26,6 +26,7 @@
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Support/StableBasicBlockNumbering.h"
+#include "llvm/Support/Visibility.h"
 #include <algorithm>
 using namespace llvm;
 
@@ -52,7 +53,7 @@
 }
 
 namespace {
-  struct PromoteMem2Reg {
+  struct VISIBILITY_HIDDEN PromoteMem2Reg {
     /// Allocas - The alloca instructions being promoted.
     ///
     std::vector<AllocaInst*> Allocas;