[llvm] r243558 - [llvm-objdump] Inverting logic to match the word "predicate". Returning true when we want it rather than when we want to discard it.
Colin LeMahieu
colinl at codeaurora.org
Wed Jul 29 12:21:14 PDT 2015
Author: colinl
Date: Wed Jul 29 14:21:13 2015
New Revision: 243558
URL: http://llvm.org/viewvc/llvm-project?rev=243558&view=rev
Log:
[llvm-objdump] Inverting logic to match the word "predicate". Returning true when we want it rather than when we want to discard it.
Modified:
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=243558&r1=243557&r2=243558&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Wed Jul 29 14:21:13 2015
@@ -202,7 +202,7 @@ public:
private:
void ScanPredicate() {
- while (Iterator != End && Predicate(*Iterator)) {
+ while (Iterator != End && !Predicate(*Iterator)) {
++Iterator;
}
}
@@ -231,14 +231,14 @@ private:
SectionFilter ToolSectionFilter(llvm::object::ObjectFile const &O) {
return SectionFilter([](llvm::object::SectionRef const &S) {
if(FilterSections.empty())
- return false;
+ return true;
llvm::StringRef String;
std::error_code error = S.getName(String);
if (error)
- return true;
+ return false;
return std::find(FilterSections.begin(),
FilterSections.end(),
- String) == FilterSections.end();
+ String) != FilterSections.end();
},
O);
}
More information about the llvm-commits
mailing list