Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index 6cd128b..9b3efe0 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -97,9 +97,13 @@
void RemoveDeadArgumentsFromFunction(Function *F);
};
- char DAE::ID = 0;
- RegisterPass<DAE> X("deadargelim", "Dead Argument Elimination");
+}
+char DAE::ID = 0;
+static RegisterPass<DAE>
+X("deadargelim", "Dead Argument Elimination");
+
+namespace {
/// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but
/// deletes arguments to functions which are external. This is only for use
/// by bugpoint.
@@ -107,11 +111,12 @@
static char ID;
virtual bool ShouldHackArguments() const { return true; }
};
- char DAH::ID = 0;
- RegisterPass<DAH> Y("deadarghaX0r",
- "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)");
}
+char DAH::ID = 0;
+static RegisterPass<DAH>
+Y("deadarghaX0r", "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)");
+
/// createDeadArgEliminationPass - This pass removes arguments from functions
/// which are not used by the body of the function.
///