[llvm] r251216 - Simplify boolean conditional return statements in tools/llvm-symbolizer.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 24 16:23:26 PDT 2015
Author: rafael
Date: Sat Oct 24 18:23:25 2015
New Revision: 251216
URL: http://llvm.org/viewvc/llvm-project?rev=251216&view=rev
Log:
Simplify boolean conditional return statements in tools/llvm-symbolizer.
Patch by Richard.
Modified:
llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
Modified: llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp?rev=251216&r1=251215&r2=251216&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp (original)
+++ llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp Sat Oct 24 18:23:25 2015
@@ -121,9 +121,7 @@ static bool parseCommand(bool &IsData, s
// Skip delimiters and parse module offset.
pos += strspn(pos, kDelimiters);
int offset_length = strcspn(pos, kDelimiters);
- if (StringRef(pos, offset_length).getAsInteger(0, ModuleOffset))
- return false;
- return true;
+ return !StringRef(pos, offset_length).getAsInteger(0, ModuleOffset);
}
int main(int argc, char **argv) {
More information about the llvm-commits
mailing list