diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index b411d4c..e585857 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -313,9 +313,7 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, auto *NewModule = NewFunc->getParent(); auto *NMD = NewModule->getOrInsertNamedMetadata("llvm.dbg.cu"); // Avoid multiple insertions of the same DICompileUnit to NMD. - SmallPtrSet<const void *, 8> Visited; - for (auto *Operand : NMD->operands()) - Visited.insert(Operand); + SmallPtrSet<const void *, 8> Visited(llvm::from_range, NMD->operands()); // Collect and clone all the compile units referenced from the instructions in // the function (e.g. as instructions' scope). |