Compute Config member function return values only once.
We had a few Config member functions that returns configuration values.
For example, we had is64() which returns true if the target is 64-bit.
The return values of these functions are constant and never change.
This patch is to compute them only once to make it clear that they'll
never change.
llvm-svn: 298168
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 335b3c9..1502aae 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -98,7 +98,7 @@
}
uint32_t Type = this->Type;
- if (!Config->copyRelocs() || (Type != SHT_RELA && Type != SHT_REL))
+ if (!Config->CopyRelocs || (Type != SHT_RELA && Type != SHT_REL))
return;
InputSection *First = Sections[0];