diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-03-29 19:04:08 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-03-29 19:04:08 +0000 |
| commit | 0623f2984f7dafa5fc722fc0c93770513fb0d1f7 (patch) | |
| tree | 2534b0040d0957470eae16e4a80de49a26329a26 /llvm | |
| parent | 16bfdb5f0278c701354cf9988a2bb3dff4cfff62 (diff) | |
| download | bcm5719-llvm-0623f2984f7dafa5fc722fc0c93770513fb0d1f7.tar.gz bcm5719-llvm-0623f2984f7dafa5fc722fc0c93770513fb0d1f7.zip | |
Checkin new useful routine
llvm-svn: 2046
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Transforms/Utils/CloneFunction.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/include/llvm/Transforms/Utils/CloneFunction.h b/llvm/include/llvm/Transforms/Utils/CloneFunction.h new file mode 100644 index 00000000000..fe29dc4ce61 --- /dev/null +++ b/llvm/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 |

