From 7dab15def6a29d86452e69d339e867057bebe6f8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 29 Mar 2002 19:04:08 +0000 Subject: [PATCH] Checkin new useful routine git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2046 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/CloneFunction.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/llvm/Transforms/Utils/CloneFunction.h diff --git a/include/llvm/Transforms/Utils/CloneFunction.h b/include/llvm/Transforms/Utils/CloneFunction.h new file mode 100644 index 00000000000..fe29dc4ce61 --- /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 +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 &ArgMap); + +#endif