From d7c5400f9e26db8baa4b7c2665adeb361eb637e3 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 5 Apr 2017 03:19:43 +0000 Subject: [PATCH] Update comment. llvm-svn: 299502 --- lld/ELF/LinkerScript.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 6e6e2d2..a39e843 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -617,10 +617,9 @@ MemoryRegion *LinkerScript::findMemoryRegion(OutputSectionCommand *Cmd, return nullptr; } - // The memory region name is empty, thus a suitable region must be - // searched for in the region map. If the region map is empty, just - // return. Note that this check doesn't happen at the very beginning - // so that uses of undeclared regions can be caught. + // If at least one memory region is defined, all sections must + // belong to some memory region. Otherwise, we don't need to do + // anything for memory regions. if (Opt.MemoryRegions.empty()) return nullptr; -- 2.7.4