summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/MC/MCContext.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h
index 6f82d4f58ca..ca4eae53a88 100644
--- a/llvm/include/llvm/MC/MCContext.h
+++ b/llvm/include/llvm/MC/MCContext.h
@@ -168,8 +168,8 @@ namespace llvm {
ELFSectionKey(StringRef SectionName, StringRef GroupName)
: SectionName(SectionName), GroupName(GroupName) {}
bool operator<(const ELFSectionKey &Other) const {
- if (SectionName < Other.SectionName)
- return true;
+ if (SectionName != Other.SectionName)
+ return SectionName < Other.SectionName;
return GroupName < Other.GroupName;
}
};
@@ -183,9 +183,9 @@ namespace llvm {
: SectionName(SectionName), GroupName(GroupName),
SelectionKey(SelectionKey) {}
bool operator<(const COFFSectionKey &Other) const {
- if (SectionName < Other.SectionName)
- return true;
- if (GroupName < Other.GroupName)
+ if (SectionName != Other.SectionName)
+ return SectionName < Other.SectionName;
+ if (GroupName != Other.GroupName)
return GroupName < Other.GroupName;
return SelectionKey < Other.SelectionKey;
}
OpenPOWER on IntegriCloud