diff options
| author | Richard Trieu <rtrieu@google.com> | 2015-03-28 02:37:33 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2015-03-28 02:37:33 +0000 |
| commit | d989386f74c7ffcc346bdda9cbf651a5b5420186 (patch) | |
| tree | bf5a09ed39c27a1d383a1adb2ad01b42be9c9682 | |
| parent | ce2b983425bb470bd5bf80a17ebc5d6c429c7332 (diff) | |
| download | bcm5719-llvm-d989386f74c7ffcc346bdda9cbf651a5b5420186.tar.gz bcm5719-llvm-d989386f74c7ffcc346bdda9cbf651a5b5420186.zip | |
Fix comparison functions.
llvm-svn: 233467
| -rw-r--r-- | llvm/include/llvm/MC/MCContext.h | 10 |
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; } |

