projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72acaa1
)
Simplify. NFC.
author
Rui Ueyama
<ruiu@google.com>
Fri, 26 Feb 2016 15:42:06 +0000
(15:42 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Fri, 26 Feb 2016 15:42:06 +0000
(15:42 +0000)
llvm-svn: 262027
lld/ELF/OutputSections.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/OutputSections.cpp
b/lld/ELF/OutputSections.cpp
index
f17d705
..
523ddd0
100644
(file)
--- a/
lld/ELF/OutputSections.cpp
+++ b/
lld/ELF/OutputSections.cpp
@@
-33,9
+33,8
@@
static bool isAlnum(char C) { return isAlpha(C) || ('0' <= C && C <= '9'); }
// 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>