write32le(Buf + 8, -TargetInfo::getPltEntryOffset(Index) - 12);
}
-template <class ELFT> TargetInfo *getTargetInfo() {
+template <class ELFT> static TargetInfo *getTargetInfo() {
if (Config->ZRetpolineplt) {
if (Config->ZNow) {
static RetpolineZNow<ELFT> T;
// This is used to handle lazy symbols. May replace existent
// symbol with lazy version or request to Fetch it.
template <class ELFT, typename LazyT, typename... ArgT>
-void replaceOrFetchLazy(StringRef Name, InputFile &File,
- llvm::function_ref<InputFile *()> Fetch,
- ArgT &&... Arg) {
+static void replaceOrFetchLazy(StringRef Name, InputFile &File,
+ llvm::function_ref<InputFile *()> Fetch,
+ ArgT &&... Arg) {
Symbol *S;
bool WasInserted;
std::tie(S, WasInserted) = Symtab->insert(Name);
#undef OPTION
};
+namespace {
class WasmOptTable : public llvm::opt::OptTable {
public:
WasmOptTable() : OptTable(OptInfo) {}
opt::InputArgList parse(ArrayRef<const char *> Argv);
};
+} // namespace
// Set color diagnostics according to -color-diagnostics={auto,always,never}
// or -no-color-diagnostics flags.
using namespace lld;
using namespace lld::wasm;
-StringRef ReloctTypeToString(uint8_t RelocType) {
+static StringRef ReloctTypeToString(uint8_t RelocType) {
switch (RelocType) {
#define WASM_RELOC(NAME, REL) case REL: return #NAME;
#include "llvm/BinaryFormat/WasmRelocs.def"