From f7703df4968084c18c248c1feea9961c19a32e6a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 9 Jan 2004 06:12:26 +0000 Subject: Finegrainify namespacification git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10727 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/CloneFunction.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'lib/Transforms/Utils/CloneFunction.cpp') diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index d8aa9aebe4..17ad8c5175 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/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 &ValueMap, - const char *NameSuffix) { +BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, + std::map &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 &ValueMap, - std::vector &Returns, - const char *NameSuffix) { +void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, + std::map &ValueMap, + std::vector &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 &ValueMap) { +Function *llvm::CloneFunction(const Function *F, + std::map &ValueMap) { std::vector 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 -- cgit v1.2.3-18-g5258