diff options
author | Mon P Wang <wangmp@apple.com> | 2011-12-23 02:18:32 +0000 |
---|---|---|
committer | Mon P Wang <wangmp@apple.com> | 2011-12-23 02:18:32 +0000 |
commit | d24397a9319a41e80169f572ad274a711f41d64e (patch) | |
tree | dde0055e7cdd6b08fc9e2928696bc303619f68ed /include/llvm/Transforms/Utils/Cloning.h | |
parent | cf985924fb73e71ed61a55a7a8dba97a8e200b3d (diff) | |
download | external_llvm-d24397a9319a41e80169f572ad274a711f41d64e.zip external_llvm-d24397a9319a41e80169f572ad274a711f41d64e.tar.gz external_llvm-d24397a9319a41e80169f572ad274a711f41d64e.tar.bz2 |
When not destroying the source, the linker is not remapping the types. Added support
to CloneFunctionInto to allow remapping for this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/Cloning.h')
-rw-r--r-- | include/llvm/Transforms/Utils/Cloning.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Transforms/Utils/Cloning.h b/include/llvm/Transforms/Utils/Cloning.h index 674c2d0..073c43a 100644 --- a/include/llvm/Transforms/Utils/Cloning.h +++ b/include/llvm/Transforms/Utils/Cloning.h @@ -134,8 +134,8 @@ inline Function *CloneFunction(const Function *F, ClonedCodeInfo *CodeInfo = 0){ /// Clone OldFunc into NewFunc, transforming the old arguments into references /// to VMap values. Note that if NewFunc already has basic blocks, the ones /// cloned into it will be added to the end of the function. This function -/// fills in a list of return instructions, and can optionally append the -/// specified suffix to all values cloned. +/// fills in a list of return instructions, and can optionally remap types +/// and/or append the specified suffix to all values cloned. /// /// If ModuleLevelChanges is false, VMap contains no non-identity GlobalValue /// mappings. @@ -145,7 +145,8 @@ void CloneFunctionInto(Function *NewFunc, const Function *OldFunc, bool ModuleLevelChanges, SmallVectorImpl<ReturnInst*> &Returns, const char *NameSuffix = "", - ClonedCodeInfo *CodeInfo = 0); + ClonedCodeInfo *CodeInfo = 0, + ValueMapTypeRemapper *TypeMapper = 0); /// CloneAndPruneFunctionInto - This works exactly like CloneFunctionInto, /// except that it does some simple constant prop and DCE on the fly. The |