[Utils] Fix a warning
This patch fixes: llvm/lib/Transforms/Utils/LoopUtils.cpp:818:28: error: unused function 'operator<<' [-Werror,-Wunused-function]
This commit is contained in:
parent
078d214672
commit
3a18fe33f0
@ -815,11 +815,14 @@ struct DbgLoop {
|
||||
const Loop *L;
|
||||
explicit DbgLoop(const Loop *L) : L(L) {}
|
||||
};
|
||||
|
||||
#ifndef NDEBUG
|
||||
static inline raw_ostream &operator<<(raw_ostream &OS, DbgLoop D) {
|
||||
OS << "function ";
|
||||
D.L->getHeader()->getParent()->printAsOperand(OS, /*PrintType=*/false);
|
||||
return OS << " " << *D.L;
|
||||
}
|
||||
#endif // NDEBUG
|
||||
|
||||
static std::optional<unsigned> estimateLoopTripCount(Loop *L) {
|
||||
// Currently we take the estimate exit count only from the loop latch,
|
||||
|
Loading…
x
Reference in New Issue
Block a user