diff options
Diffstat (limited to 'ELF/OutputSections.cpp')
-rw-r--r-- | ELF/OutputSections.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/ELF/OutputSections.cpp b/ELF/OutputSections.cpp index 4636b9990..4be844739 100644 --- a/ELF/OutputSections.cpp +++ b/ELF/OutputSections.cpp @@ -11,6 +11,7 @@ #include "Config.h" #include "EhFrame.h" #include "LinkerScript.h" +#include "Strings.h" #include "SymbolTable.h" #include "Target.h" #include "lld/Core/Parallel.h" @@ -29,18 +30,6 @@ using namespace llvm::ELF; using namespace lld; using namespace lld::elf; -static bool isAlpha(char C) { - return ('a' <= C && C <= 'z') || ('A' <= C && C <= 'Z') || C == '_'; -} - -static bool isAlnum(char C) { return isAlpha(C) || ('0' <= C && C <= '9'); } - -// Returns true if S is valid as a C language identifier. -bool elf::isValidCIdentifier(StringRef S) { - return !S.empty() && isAlpha(S[0]) && - std::all_of(S.begin() + 1, S.end(), isAlnum); -} - template <class ELFT> OutputSectionBase<ELFT>::OutputSectionBase(StringRef Name, uint32_t Type, uintX_t Flags) |