[MISched] Fix non-debug builds.
authorFrancesco Petrogalli <francesco.petrogalli@apple.com>
Wed, 14 Jun 2023 13:11:44 +0000 (15:11 +0200)
committerFrancesco Petrogalli <francesco.petrogalli@apple.com>
Wed, 14 Jun 2023 13:12:14 +0000 (15:12 +0200)
As reported in https://github.com/llvm/llvm-project/issues/63225, we
need to make sure we can use the `&operator<<` on instances of the
`ResourceSegments` class for builds that set `NDEBUG`.

Reviewed By: sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D152817

llvm/include/llvm/CodeGen/MachineScheduler.h

index bd3885d..c950a9a 100644 (file)
@@ -815,7 +815,6 @@ public:
                          const ResourceSegments &c2) {
     return c1._Intervals == c2._Intervals;
   }
-#ifndef NDEBUG
   friend llvm::raw_ostream &operator<<(llvm::raw_ostream &os,
                                        const ResourceSegments &Segments) {
     os << "{ ";
@@ -824,7 +823,6 @@ public:
     os << "}\n";
     return os;
   }
-#endif
 };
 
 /// Each Scheduling boundary is associated with ready queues. It tracks the