[lld] r317428 - Inline a small function.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 4 16:57:51 PDT 2017
Author: ruiu
Date: Sat Nov 4 16:57:51 2017
New Revision: 317428
URL: http://llvm.org/viewvc/llvm-project?rev=317428&view=rev
Log:
Inline a small function.
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=317428&r1=317427&r2=317428&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Sat Nov 4 16:57:51 2017
@@ -427,13 +427,6 @@ static OutputSection *findByName(ArrayRe
return nullptr;
}
-static void reportOrphan(InputSectionBase *IS, StringRef Name) {
- if (Config->OrphanHandling == OrphanHandlingPolicy::Error)
- error(toString(IS) + " is being placed in '" + Name + "'");
- else if (Config->OrphanHandling == OrphanHandlingPolicy::Warn)
- warn(toString(IS) + " is being placed in '" + Name + "'");
-}
-
static OutputSection *createSection(InputSectionBase *IS,
StringRef OutsecName) {
OutputSection *Sec = Script->createOutputSection(OutsecName, "<internal>");
@@ -542,7 +535,11 @@ void LinkerScript::addOrphanSections() {
continue;
StringRef Name = getOutputSectionName(S->Name);
- reportOrphan(S, Name);
+
+ if (Config->OrphanHandling == OrphanHandlingPolicy::Error)
+ error(toString(S) + " is being placed in '" + Name + "'");
+ else if (Config->OrphanHandling == OrphanHandlingPolicy::Warn)
+ warn(toString(S) + " is being placed in '" + Name + "'");
if (OutputSection *Sec =
findByName(makeArrayRef(SectionCommands).slice(0, End), Name)) {
More information about the llvm-commits
mailing list