diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/LTO/LTOCodeGenerator.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/LTO/LTOCodeGenerator.cpp b/contrib/llvm-project/llvm/lib/LTO/LTOCodeGenerator.cpp index 088e45c9e8dc..fdc9896aca78 100644 --- a/contrib/llvm-project/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/contrib/llvm-project/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -135,9 +135,8 @@ LTOCodeGenerator::LTOCodeGenerator(LLVMContext &Context) LTOCodeGenerator::~LTOCodeGenerator() {} void LTOCodeGenerator::setAsmUndefinedRefs(LTOModule *Mod) { - const std::vector<StringRef> &undefs = Mod->getAsmUndefinedRefs(); - for (int i = 0, e = undefs.size(); i != e; ++i) - AsmUndefinedRefs.insert(undefs[i]); + for (const StringRef &Undef : Mod->getAsmUndefinedRefs()) + AsmUndefinedRefs.insert(Undef); } bool LTOCodeGenerator::addModule(LTOModule *Mod) { |