summaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/Utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-03-29 19:04:08 +0000
committerChris Lattner <sabre@nondot.org>2002-03-29 19:04:08 +0000
commit7dab15def6a29d86452e69d339e867057bebe6f8 (patch)
tree24ee3712e7c3a618d0b42a7cab0e569d93ef3270 /include/llvm/Transforms/Utils
parentfa703a4ae5dedce3cb43b75a57b6546a8dc61a06 (diff)
downloadllvm-7dab15def6a29d86452e69d339e867057bebe6f8.tar.gz
llvm-7dab15def6a29d86452e69d339e867057bebe6f8.tar.bz2
llvm-7dab15def6a29d86452e69d339e867057bebe6f8.tar.xz
Checkin new useful routine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils')
-rw-r--r--include/llvm/Transforms/Utils/CloneFunction.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/CloneFunction.h b/include/llvm/Transforms/Utils/CloneFunction.h
new file mode 100644
index 0000000000..fe29dc4ce6
--- /dev/null
+++ b/include/llvm/Transforms/Utils/CloneFunction.h
@@ -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