[lld] r258599 - [ELF] Avoid unnecessary global variable.
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 17:49:37 PST 2016
Author: silvas
Date: Fri Jan 22 19:49:37 2016
New Revision: 258599
URL: http://llvm.org/viewvc/llvm-project?rev=258599&view=rev
Log:
[ELF] Avoid unnecessary global variable.
Summary: It looks like this snuck through in r256143/D15383.
Reviewers: ruiu, grimar
Differential Revision: http://reviews.llvm.org/D16500
Modified:
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/OutputSections.h
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=258599&r1=258598&r2=258599&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Jan 22 19:49:37 2016
@@ -23,8 +23,6 @@ using namespace llvm::ELF;
using namespace lld;
using namespace lld::elf2;
-bool elf2::HasGotOffRel = false;
-
template <class ELFT>
OutputSectionBase<ELFT>::OutputSectionBase(StringRef Name, uint32_t Type,
uintX_t Flags)
Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=258599&r1=258598&r2=258599&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Fri Jan 22 19:49:37 2016
@@ -36,10 +36,6 @@ template <class ELFT> class OutputSectio
template <class ELFT> class ObjectFile;
template <class ELFT> class DefinedRegular;
-// Flag to force GOT to be in output if we have relocations
-// that relies on its address.
-extern bool HasGotOffRel;
-
template <class ELFT>
static inline typename llvm::object::ELFFile<ELFT>::uintX_t
getAddend(const typename llvm::object::ELFFile<ELFT>::Elf_Rel &Rel) {
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=258599&r1=258598&r2=258599&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Jan 22 19:49:37 2016
@@ -95,6 +95,10 @@ private:
uintX_t SectionHeaderOff;
llvm::StringMap<llvm::StringRef> InputToOutputSection;
+
+ // Flag to force GOT to be in output if we have relocations
+ // that relies on its address.
+ bool HasGotOffRel = false;
};
} // anonymous namespace
More information about the llvm-commits
mailing list