[lld] r262027 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 07:42:06 PST 2016
Author: ruiu
Date: Fri Feb 26 09:42:06 2016
New Revision: 262027
URL: http://llvm.org/viewvc/llvm-project?rev=262027&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=262027&r1=262026&r2=262027&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Feb 26 09:42:06 2016
@@ -33,9 +33,8 @@ static bool isAlnum(char C) { return isA
// Returns true if S is valid as a C language identifier.
bool elf2::isValidCIdentifier(StringRef S) {
- if (S.empty() || !isAlpha(S[0]))
- return false;
- return std::all_of(S.begin() + 1, S.end(), isAlnum);
+ return !S.empty() && isAlpha(S[0]) &&
+ std::all_of(S.begin() + 1, S.end(), isAlnum);
}
template <class ELFT>
More information about the llvm-commits
mailing list