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);