diff options
-rw-r--r-- | include/llvm/Transforms/Utils/CloneFunction.h | 17 |
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 |