File tree Expand file tree Collapse file tree 2 files changed +19
-22
lines changed Expand file tree Collapse file tree 2 files changed +19
-22
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,25 @@ class Use {
8484 Use **Prev = nullptr ;
8585 User *Parent = nullptr ;
8686
87- inline void addToList (Use **List);
88- inline void removeFromList ();
87+ void addToList (Use **List) {
88+ Next = *List;
89+ if (Next)
90+ Next->Prev = &Next;
91+ Prev = List;
92+ *Prev = this ;
93+ }
94+
95+ void removeFromList () {
96+ if (Prev) {
97+ *Prev = Next;
98+ if (Next) {
99+ Next->Prev = Prev;
100+ Next = nullptr ;
101+ }
102+
103+ Prev = nullptr ;
104+ }
105+ }
89106};
90107
91108// / Allow clients to treat uses just like values when using
Original file line number Diff line number Diff line change @@ -915,26 +915,6 @@ const Use &Use::operator=(const Use &RHS) {
915915 return *this ;
916916}
917917
918- void Use::addToList (Use **List) {
919- Next = *List;
920- if (Next)
921- Next->Prev = &Next;
922- Prev = List;
923- *Prev = this ;
924- }
925-
926- void Use::removeFromList () {
927- if (Prev) {
928- *Prev = Next;
929- if (Next) {
930- Next->Prev = Prev;
931- Next = nullptr ;
932- }
933-
934- Prev = nullptr ;
935- }
936- }
937-
938918template <class Compare > void Value::sortUseList (Compare Cmp) {
939919 if (!UseList || !UseList->Next )
940920 // No need to sort 0 or 1 uses.
You can’t perform that action at this time.
0 commit comments