From 19282365147f498a60463d250dbed2f8e1b81861 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 30 Dec 2010 22:34:44 +0000 Subject: [PATCH] Make a bunch of symbols internal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122642 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCDwarf.cpp | 33 ++++++++++++++++----------------- lib/Transforms/Utils/Local.cpp | 3 ++- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp index 0b8b06c0455..9e727570617 100644 --- a/lib/MC/MCDwarf.cpp +++ b/lib/MC/MCDwarf.cpp @@ -712,31 +712,30 @@ static MCSymbol *EmitFDE(MCStreamer &streamer, return fdeEnd; } -struct CIEKey { - static const CIEKey EmptyKey; - static const CIEKey TombstoneKey; +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; -}; - -const CIEKey CIEKey::EmptyKey(0, 0, -1); -const CIEKey CIEKey::TombstoneKey(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 { 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; diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 86dd4e9364d..cd7537f3cf1 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -650,7 +650,8 @@ bool llvm::EliminateDuplicatePHINodes(BasicBlock *BB) { /// 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(V); if (!U) return Align;