From d78c400b5bfb7904769b0ef9d259c7bb2573d8f8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 13 May 2008 00:00:25 +0000 Subject: 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. llvm-svn: 51017 --- llvm/lib/Transforms/Scalar/DCE.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/DCE.cpp') diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp index 539dd22d47d..a63fcb6589f 100644 --- a/llvm/lib/Transforms/Scalar/DCE.cpp +++ b/llvm/lib/Transforms/Scalar/DCE.cpp @@ -52,11 +52,12 @@ namespace { AU.setPreservesCFG(); } }; - - char DeadInstElimination::ID = 0; - RegisterPass X("die", "Dead Instruction Elimination"); } +char DeadInstElimination::ID = 0; +static RegisterPass +X("die", "Dead Instruction Elimination"); + Pass *llvm::createDeadInstEliminationPass() { return new DeadInstElimination(); } @@ -76,11 +77,11 @@ namespace { AU.setPreservesCFG(); } }; - - char DCE::ID = 0; - RegisterPass Y("dce", "Dead Code Elimination"); } +char DCE::ID = 0; +static RegisterPass Y("dce", "Dead Code Elimination"); + bool DCE::runOnFunction(Function &F) { // Start out with all of the instructions in the worklist... std::vector WorkList; -- cgit v1.2.3