summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-12-30 22:34:44 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-12-30 22:34:44 +0000
commit570dd787a6caf902fc918eff212e35a72662fe58 (patch)
tree27cfd5d4cb4e7d3f668641eda8cf4a66084e5170
parentee0432ce08941d74b47ad0cef4c6890018e8ab08 (diff)
downloadbcm5719-llvm-570dd787a6caf902fc918eff212e35a72662fe58.tar.gz
bcm5719-llvm-570dd787a6caf902fc918eff212e35a72662fe58.zip
Make a bunch of symbols internal.
llvm-svn: 122642
-rw-r--r--llvm/lib/MC/MCDwarf.cpp35
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp3
2 files changed, 19 insertions, 19 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 0b8b06c0455..9e727570617 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/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;
-
- 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;
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 86dd4e9364d..cd7537f3cf1 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/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<User>(V);
if (!U) return Align;
OpenPOWER on IntegriCloud