mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-01 01:31:26 +00:00
[lld] Make helpers static. NFC.
llvm-svn: 332408
This commit is contained in:
parent
919882638e
commit
5455038d98
@ -573,7 +573,7 @@ void RetpolineZNow<ELFT>::writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr,
|
||||
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;
|
||||
|
@ -598,9 +598,9 @@ Symbol *SymbolTable::find(StringRef Name) {
|
||||
// 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);
|
||||
|
@ -98,11 +98,13 @@ static const opt::OptTable::Info OptInfo[] = {
|
||||
#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.
|
||||
|
@ -23,7 +23,7 @@ using namespace llvm::support::endian;
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user