diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-09 06:02:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-09 06:02:20 +0000 |
commit | d7456026629fc1760a45e6e955e9834246493147 (patch) | |
tree | 4439882743f35a55edc3808366599b8d94d763dc /lib/Transforms/Utils/LowerSwitch.cpp | |
parent | 559d519549072fc7c3ca3ee5dae78733096f22c0 (diff) |
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 24e48d4c5d..f6e6886bb5 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -22,8 +22,7 @@ #include "llvm/Pass.h" #include "Support/Debug.h" #include "Support/Statistic.h" - -namespace llvm { +using namespace llvm; namespace { Statistic<> NumLowered("lowerswitch", "Number of SwitchInst's replaced"); @@ -62,7 +61,7 @@ namespace { } // createLowerSwitchPass - Interface to this file... -FunctionPass *createLowerSwitchPass() { +FunctionPass *llvm::createLowerSwitchPass() { return new LowerSwitch(); } @@ -83,12 +82,12 @@ bool LowerSwitch::runOnFunction(Function &F) { // operator<< - Used for debugging purposes. // -std::ostream& operator << (std::ostream& O, std::vector<LowerSwitch::Case>& C) -{ +std::ostream& operator<<(std::ostream &O, + const std::vector<LowerSwitch::Case> &C) { O << "["; - for (std::vector<LowerSwitch::Case>::iterator B = C.begin(), E = C.end(); - B != E; ) { + for (std::vector<LowerSwitch::Case>::const_iterator B = C.begin(), + E = C.end(); B != E; ) { O << *B->first; if (++B != E) O << ", "; } @@ -224,5 +223,3 @@ void LowerSwitch::processSwitchInst(SwitchInst *SI) { // We are now done with the switch instruction, delete it. delete SI; } - -} // End llvm namespace |