From 902ae3cb3fd97f63f2144926dc1e9cff9a80b931 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Thu, 15 Dec 2016 00:57:53 +0000 Subject: [PATCH] Rename this variable. `SC` didn't make much sense. We don't seem to have a clear convention, but `IS` sounds good here because it emphasizes that it is an input section (this is one place in the code where we are dealing with both input sections and output sections at the same time so that extra emphasis makes it a bit clearer). llvm-svn: 289748 --- lld/ELF/Symbols.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index ba1f218..d9d02bd 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -44,17 +44,17 @@ static typename ELFT::uint getSymVA(const SymbolBody &Body, } case SymbolBody::DefinedRegularKind: { auto &D = cast>(Body); - InputSectionBase *SC = D.Section; + InputSectionBase *IS = D.Section; // According to the ELF spec reference to a local symbol from outside // the group are not allowed. Unfortunately .eh_frame breaks that rule // and must be treated specially. For now we just replace the symbol with // 0. - if (SC == &InputSection::Discarded) + if (IS == &InputSection::Discarded) return 0; // This is an absolute symbol. - if (!SC) + if (!IS) return D.Value; uintX_t Offset = D.Value; @@ -62,7 +62,7 @@ static typename ELFT::uint getSymVA(const SymbolBody &Body, Offset += Addend; Addend = 0; } - uintX_t VA = (SC->OutSec ? SC->OutSec->Addr : 0) + SC->getOffset(Offset); + uintX_t VA = (IS->OutSec ? IS->OutSec->Addr : 0) + IS->getOffset(Offset); if (D.isTls() && !Config->Relocatable) { if (!Out::TlsPhdr) fatal(toString(D.File) + -- 2.7.4