[elf2] get{Local,Global}DynamicReloc -> is{LocalGlobal}DynamicReloc.

llvm-svn: 252982
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index afb373d..0896d04 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -108,7 +108,7 @@
     uint8_t *BufLoc = Buf + Offset;
     uintX_t AddrLoc = OutSec->getVA() + Offset;
 
-    if (Type == Target->getTlsLocalDynamicReloc()) {
+    if (Target->isTlsLocalDynamicReloc(Type)) {
       Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc,
                           Out<ELFT>::Got->getVA() +
                               Out<ELFT>::LocalModuleTlsIndexOffset +
@@ -127,7 +127,7 @@
 
     SymbolBody &Body = *File->getSymbolBody(SymIndex)->repl();
 
-    if (Type == Target->getTlsGlobalDynamicReloc()) {
+    if (Target->isTlsGlobalDynamicReloc(Type)) {
       Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc,
                           Out<ELFT>::Got->getEntryAddr(Body) +
                               getAddend<ELFT>(RI));
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 9def870..e4de54e 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -205,7 +205,7 @@
 
     uint32_t Type = RI.getType(Config->Mips64EL);
 
-    if (Type == Target->getTlsLocalDynamicReloc()) {
+    if (Target->isTlsLocalDynamicReloc(Type)) {
       P->setSymbolAndType(0, Target->getTlsModuleIndexReloc(),
                           Config->Mips64EL);
       P->r_offset =
@@ -213,7 +213,7 @@
       continue;
     }
 
-    if (Body && Type == Target->getTlsGlobalDynamicReloc()) {
+    if (Body && Target->isTlsGlobalDynamicReloc(Type)) {
       P->setSymbolAndType(Body->getDynamicSymbolTableIndex(),
                           Target->getTlsModuleIndexReloc(), Config->Mips64EL);
       P->r_offset = Out<ELFT>::Got->getEntryAddr(*Body);
diff --git a/lld/ELF/Target.h b/lld/ELF/Target.h
index 55ea614..578aab8 100644
--- a/lld/ELF/Target.h
+++ b/lld/ELF/Target.h
@@ -29,8 +29,12 @@
   unsigned getPltReloc() const { return PltReloc; }
   unsigned getGotRefReloc() const { return GotRefReloc; }
   unsigned getRelativeReloc() const { return RelativeReloc; }
-  unsigned getTlsLocalDynamicReloc() const { return TlsLocalDynamicReloc; }
-  unsigned getTlsGlobalDynamicReloc() const { return TlsGlobalDynamicReloc; }
+  bool isTlsLocalDynamicReloc(unsigned Type) const {
+    return Type == TlsLocalDynamicReloc;
+  }
+  bool isTlsGlobalDynamicReloc(unsigned Type) const {
+    return Type == TlsGlobalDynamicReloc;
+  }
   unsigned getTlsModuleIndexReloc() const { return TlsModuleIndexReloc; }
   unsigned getTlsOffsetReloc() const { return TlsOffsetReloc; }
   unsigned getPltZeroEntrySize() const { return PltZeroEntrySize; }
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 4772bec..975a216 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -199,7 +199,7 @@
     SymbolBody *Body = File.getSymbolBody(SymIndex);
     uint32_t Type = RI.getType(Config->Mips64EL);
 
-    if (Type == Target->getTlsLocalDynamicReloc()) {
+    if (Target->isTlsLocalDynamicReloc(Type)) {
       if (Out<ELFT>::LocalModuleTlsIndexOffset == uint32_t(-1)) {
         Out<ELFT>::LocalModuleTlsIndexOffset =
             Out<ELFT>::Got->addLocalModuleTlsIndex();
@@ -217,7 +217,7 @@
       Body = Body->repl();
 
     if (Body && Body->isTLS()) {
-      if (Type != Target->getTlsGlobalDynamicReloc())
+      if (!Target->isTlsGlobalDynamicReloc(Type))
         continue;
       if (Body->isInGot())
         continue;