[PATCH] D9978: Refactor: Simplify boolean conditional return statements in llvm/lib/Support
Alexander Kornienko via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 28 07:49:43 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL256500: Refactor: Simplify boolean conditional return statements in llvm/lib/Support (authored by alexfh).
Changed prior to commit:
http://reviews.llvm.org/D9978?vs=38327&id=43694#toc
Repository:
rL LLVM
http://reviews.llvm.org/D9978
Files:
llvm/trunk/lib/Support/CommandLine.cpp
llvm/trunk/lib/Support/YAMLParser.cpp
Index: llvm/trunk/lib/Support/CommandLine.cpp
===================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp
+++ llvm/trunk/lib/Support/CommandLine.cpp
@@ -345,10 +345,7 @@
Value = Val;
}
- if (Handler->addOccurrence(pos, ArgName, Value, MultiArg))
- return true;
-
- return false;
+ return Handler->addOccurrence(pos, ArgName, Value, MultiArg);
}
/// ProvideOption - For Value, this differentiates between an empty value ("")
Index: llvm/trunk/lib/Support/YAMLParser.cpp
===================================================================
--- llvm/trunk/lib/Support/YAMLParser.cpp
+++ llvm/trunk/lib/Support/YAMLParser.cpp
@@ -962,10 +962,8 @@
bool Scanner::isBlankOrBreak(StringRef::iterator Position) {
if (Position == End)
return false;
- if ( *Position == ' ' || *Position == '\t'
- || *Position == '\r' || *Position == '\n')
- return true;
- return false;
+ return *Position == ' ' || *Position == '\t' || *Position == '\r' ||
+ *Position == '\n';
}
bool Scanner::consumeLineBreakIfPresent() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9978.43694.patch
Type: text/x-patch
Size: 1102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151228/e3867c04/attachment.bin>
More information about the llvm-commits
mailing list