Date: Mon, 29 Jan 2018 13:48:15 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328542 - head/contrib/llvm/tools/lld/ELF Message-ID: <201801291348.w0TDmFgu062723@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Jan 29 13:48:15 2018 New Revision: 328542 URL: https://svnweb.freebsd.org/changeset/base/328542 Log: lld: Use lookup instead of find. NFC, just simpler. Obtained from: LLVM r323395 by Rafael Espindola Modified: head/contrib/llvm/tools/lld/ELF/LinkerScript.cpp Modified: head/contrib/llvm/tools/lld/ELF/LinkerScript.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/LinkerScript.cpp Mon Jan 29 11:03:29 2018 (r328541) +++ head/contrib/llvm/tools/lld/ELF/LinkerScript.cpp Mon Jan 29 13:48:15 2018 (r328542) @@ -617,9 +617,8 @@ MemoryRegion *LinkerScript::findMemoryRegion(OutputSec // If a memory region name was specified in the output section command, // then try to find that region first. if (!Sec->MemoryRegionName.empty()) { - auto It = MemoryRegions.find(Sec->MemoryRegionName); - if (It != MemoryRegions.end()) - return It->second; + if (MemoryRegion *M = MemoryRegions.lookup(Sec->MemoryRegionName)) + return M; error("memory region '" + Sec->MemoryRegionName + "' not declared"); return nullptr; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801291348.w0TDmFgu062723>