diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 39ac48c..d552086 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -244,12 +244,7 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, mapToSelfIfNew(CU); for (DIType *Type : DIFinder->types()) - // Don't skip subprogram's local types. - if (!isa_and_present<DILocalScope>(Type->getScope()) || - SPClonedWithinModule == nullptr || - dyn_cast<DILocalScope>(Type->getScope())->getSubprogram() != - SPClonedWithinModule) - mapToSelfIfNew(Type); + mapToSelfIfNew(Type); } else { assert(!SPClonedWithinModule && "Subprogram should be in DIFinder->subprogram_count()..."); |