mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 02:26:05 +00:00
[gold-plugin] - Fix compilation after LLVM update (r314883). NFC.
llvm-svn: 314899
This commit is contained in:
parent
8dd702c1cd
commit
3040da03e0
@ -608,16 +608,11 @@ static std::string getThinLTOObjectFileName(StringRef Path, StringRef OldSuffix,
|
||||
return NewNewPath;
|
||||
}
|
||||
|
||||
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.
|
||||
static bool isValidCIdentifier(StringRef S) {
|
||||
return !S.empty() && isAlpha(S[0]) &&
|
||||
std::all_of(S.begin() + 1, S.end(), isAlnum);
|
||||
return !S.empty() && (isAlpha(S[0]) || S[0] == '_') &&
|
||||
std::all_of(S.begin() + 1, S.end(),
|
||||
[](char C) { return C == '_' || isAlnum(C); });
|
||||
}
|
||||
|
||||
static void addModule(LTO &Lto, claimed_file &F, const void *View,
|
||||
|
Loading…
x
Reference in New Issue
Block a user