Extend function cloning interface to support inlining
authorChris Lattner <sabre@nondot.org>
Tue, 19 Nov 2002 21:54:38 +0000 (21:54 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 19 Nov 2002 21:54:38 +0000 (21:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4767 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/Cloning.h

index 86af4eb70eeebbe8da57f8ff98d88b823f26c930..7434a2ece8e3eabf2d84550bff83bf4e9b7d0a38 100644 (file)
@@ -17,13 +17,18 @@ class Function;
 class BasicBlock;
 class Value;
 class CallInst;
+class ReturnInst;
 
 // Clone OldFunc into NewFunc, transforming the old arguments into references to
 // ArgMap values.  Note that if NewFunc already has basic blocks, the ones
-// cloned into it will be added to the end of the function.
+// cloned into it will be added to the end of the function.  This function fills
+// in a list of return instructions, and can optionally append the specified
+// suffix to all values cloned.
 //
 void CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
-                       const std::vector<Value*> &ArgMap);
+                       const std::vector<Value*> &ArgMap,
+                       std::vector<ReturnInst*> &Returns,
+                       const char *NameSuffix = "");
 
 
 // InlineFunction - This function forcibly inlines the called function into the