diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-01-09 06:12:26 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-01-09 06:12:26 +0000 |
| commit | df3c342a4c254870b63709c7268a575a75e2bafc (patch) | |
| tree | 4fd749cc0f01b7cdb2ace80a8c1bcb6d79eed510 /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
| parent | fdf788eebdd1545969aa1b61ac95f79511cb0086 (diff) | |
| download | bcm5719-llvm-df3c342a4c254870b63709c7268a575a75e2bafc.tar.gz bcm5719-llvm-df3c342a4c254870b63709c7268a575a75e2bafc.zip | |
Finegrainify namespacification
llvm-svn: 10727
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index d8aa9aebe43..17ad8c5175d 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -18,8 +18,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "ValueMapper.h" - -namespace llvm { +using namespace llvm; // RemapInstruction - Convert the instruction operands from referencing the // current values into those specified by ValueMap. @@ -41,9 +40,9 @@ static inline void RemapInstruction(Instruction *I, } // CloneBasicBlock - See comments in Cloning.h -BasicBlock *CloneBasicBlock(const BasicBlock *BB, - std::map<const Value*, Value*> &ValueMap, - const char *NameSuffix) { +BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, + std::map<const Value*, Value*> &ValueMap, + const char *NameSuffix) { BasicBlock *NewBB = new BasicBlock(""); if (BB->hasName()) NewBB->setName(BB->getName()+NameSuffix); @@ -62,10 +61,10 @@ BasicBlock *CloneBasicBlock(const BasicBlock *BB, // Clone OldFunc into NewFunc, transforming the old arguments into references to // ArgMap values. // -void CloneFunctionInto(Function *NewFunc, const Function *OldFunc, - std::map<const Value*, Value*> &ValueMap, - std::vector<ReturnInst*> &Returns, - const char *NameSuffix) { +void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, + std::map<const Value*, Value*> &ValueMap, + std::vector<ReturnInst*> &Returns, + const char *NameSuffix) { assert(NameSuffix && "NameSuffix cannot be null!"); #ifndef NDEBUG @@ -112,8 +111,8 @@ void CloneFunctionInto(Function *NewFunc, const Function *OldFunc, /// updated to include mappings from all of the instructions and basicblocks in /// the function from their old to new values. /// -Function *CloneFunction(const Function *F, - std::map<const Value*, Value*> &ValueMap) { +Function *llvm::CloneFunction(const Function *F, + std::map<const Value*, Value*> &ValueMap) { std::vector<const Type*> ArgTypes; // The user might be deleting arguments to the function by specifying them in @@ -143,4 +142,3 @@ Function *CloneFunction(const Function *F, return NewF; } -} // End llvm namespace |

