diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-22 00:23:08 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-22 00:23:08 +0000 |
commit | f489688114275c821b1e647e26f71eeb94d8ab24 (patch) | |
tree | e26d6b2b7b7c4923e40e3cc04f3a98ef478b1af3 /lib/CodeGen/CodeGenModule.h | |
parent | 7255a2d997b15beae82e627052fdb1b2474495c2 (diff) |
Per Chris's comment, remove another static (this one
is a static comparator operator).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 713a5fdd64..fbb5d35022 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -80,6 +80,20 @@ namespace CodeGen { unsigned int lex_order; OrderGlobalInits(unsigned int p, unsigned int l) : priority(p), lex_order(l) {} + friend bool operator==(const OrderGlobalInits &LHS, + const OrderGlobalInits &RHS) { + return LHS.priority == RHS.priority && + LHS.lex_order == RHS.lex_order; + } + + friend bool operator<(const OrderGlobalInits &LHS, + const OrderGlobalInits &RHS) { + if (LHS.priority < RHS.priority) + return true; + + return LHS.priority == RHS.priority && + LHS.lex_order < RHS.lex_order; + } } OrderGlobalInitsType; /// CodeGenModule - This class organizes the cross-function state that is used |