Checkin new useful routine
authorChris Lattner <sabre@nondot.org>
Fri, 29 Mar 2002 19:04:08 +0000 (19:04 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 29 Mar 2002 19:04:08 +0000 (19:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2046 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/CloneFunction.h [new file with mode: 0644]

diff --git a/include/llvm/Transforms/Utils/CloneFunction.h b/include/llvm/Transforms/Utils/CloneFunction.h
new file mode 100644 (file)
index 0000000..fe29dc4
--- /dev/null
@@ -0,0 +1,17 @@
+
+
+#ifndef LLVM_TRANSFORMS_CLONE_FUNCTION_H
+#define LLVM_TRANSFORMS_CLONE_FUNCTION_H
+
+#include <vector>
+class Function;
+class Value;
+
+// 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.
+//
+void CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
+                       const std::vector<Value*> &ArgMap);
+
+#endif