diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index d47633a..8863dff 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -172,18 +172,15 @@ bool llvm::BuildDebugInfoMDMap(DenseMap<const Metadata *, TrackingMDRef> &MD, }; // Avoid cloning types, compile units, and (other) subprograms. - SmallPtrSet<const DISubprogram *, 16> MappedToSelfSPs; for (DISubprogram *ISP : DIFinder.subprograms()) { - if (ISP != SPClonedWithinModule) { + if (ISP != SPClonedWithinModule) mapToSelfIfNew(ISP); - MappedToSelfSPs.insert(ISP); - } } // If a subprogram isn't going to be cloned skip its lexical blocks as well. for (DIScope *S : DIFinder.scopes()) { auto *LScope = dyn_cast<DILocalScope>(S); - if (LScope && MappedToSelfSPs.count(LScope->getSubprogram())) + if (LScope && LScope->getSubprogram() != SPClonedWithinModule) mapToSelfIfNew(S); } |