[PATCH] D13023: [Bug 21683 relative] - Refactor of SimpleDefinedAtom::sortReferences()

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 05:17:39 PDT 2015


grimar added inline comments.

================
Comment at: Simple.h:188
@@ -180,2 +187,3 @@
 
-  static void destroySentinel(lld::SimpleReference*) {}
+  void destroySentinel(lld::SimpleReference *sentinel) {
+	// the same situation as described above in createSentinel()
----------------
denis-protivensky wrote:
> Next time, please, provide the context.
> 
> This is a specialization of `ilist_sentinel_traits` template, and by changing the signature you made the default method play instead of this one. It may be a luck that sorting below worked for you, but it most likely hurt the correctness.
No, I dont think so. llvm::ilist inherits from ilist_sentinel_traits so we are free to declare destroySentinel static or not depending on our needs. That is widely used in another llvm code. I removed static modifier because we have non-static member variable here.


http://reviews.llvm.org/D13023





More information about the llvm-commits mailing list