[llvm-commits] [llvm] r122642 - in /llvm/trunk/lib: MC/MCDwarf.cpp Transforms/Utils/Local.cpp

Benjamin Kramer benny.kra at googlemail.com
Thu Dec 30 14:34:44 PST 2010


Author: d0k
Date: Thu Dec 30 16:34:44 2010
New Revision: 122642

URL: http://llvm.org/viewvc/llvm-project?rev=122642&view=rev
Log:
Make a bunch of symbols internal.

Modified:
    llvm/trunk/lib/MC/MCDwarf.cpp
    llvm/trunk/lib/Transforms/Utils/Local.cpp

Modified: llvm/trunk/lib/MC/MCDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=122642&r1=122641&r2=122642&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDwarf.cpp (original)
+++ llvm/trunk/lib/MC/MCDwarf.cpp Thu Dec 30 16:34:44 2010
@@ -712,31 +712,30 @@
   return fdeEnd;
 }
 
-struct CIEKey {
-  static const CIEKey EmptyKey;
-  static const CIEKey TombstoneKey;
-
-  CIEKey(const MCSymbol* Personality_, unsigned PersonalityEncoding_,
-         unsigned LsdaEncoding_) : Personality(Personality_),
-                                   PersonalityEncoding(PersonalityEncoding_),
-                                   LsdaEncoding(LsdaEncoding_) {
-  }
-  const MCSymbol* Personality;
-  unsigned PersonalityEncoding;
-  unsigned LsdaEncoding;
-};
-
-const CIEKey CIEKey::EmptyKey(0, 0, -1);
-const CIEKey CIEKey::TombstoneKey(0, -1, 0);
+namespace {
+  struct CIEKey {
+    static const CIEKey getEmptyKey() { return CIEKey(0, 0, -1); }
+    static const CIEKey getTombstoneKey() { return CIEKey(0, -1, 0); }
+
+    CIEKey(const MCSymbol* Personality_, unsigned PersonalityEncoding_,
+           unsigned LsdaEncoding_) : Personality(Personality_),
+                                     PersonalityEncoding(PersonalityEncoding_),
+                                     LsdaEncoding(LsdaEncoding_) {
+    }
+    const MCSymbol* Personality;
+    unsigned PersonalityEncoding;
+    unsigned LsdaEncoding;
+  };
+}
 
 namespace llvm {
   template <>
   struct DenseMapInfo<CIEKey> {
     static CIEKey getEmptyKey() {
-      return CIEKey::EmptyKey;
+      return CIEKey::getEmptyKey();
     }
     static CIEKey getTombstoneKey() {
-      return CIEKey::TombstoneKey;
+      return CIEKey::getTombstoneKey();
     }
     static unsigned getHashValue(const CIEKey &Key) {
       FoldingSetNodeID ID;

Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=122642&r1=122641&r2=122642&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/Local.cpp Thu Dec 30 16:34:44 2010
@@ -650,7 +650,8 @@
 /// is to simply align all global variables and allocation instructions to
 /// their preferred alignment from the beginning.
 ///
-unsigned enforceKnownAlignment(Value *V, unsigned Align, unsigned PrefAlign) {
+static unsigned enforceKnownAlignment(Value *V, unsigned Align,
+                                      unsigned PrefAlign) {
 
   User *U = dyn_cast<User>(V);
   if (!U) return Align;





More information about the llvm-commits mailing list