From eb70ac024931ab66e6f2185af9ef3a39e62b683c Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 24 Aug 2019 02:50:42 +0000 Subject: [LoopFusion] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build llvm-svn: 369836 --- llvm/lib/Transforms/Scalar/LoopFuse.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/LoopFuse.cpp') diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp index 704a71e..3892d09b 100644 --- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp +++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp @@ -354,15 +354,15 @@ using LoopVector = SmallVector; using FusionCandidateSet = std::set; using FusionCandidateCollection = SmallVector; -inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, +#if !defined(NDEBUG) +static llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const FusionCandidateSet &CandSet) { - for (auto IT : CandSet) - OS << IT << "\n"; + for (const FusionCandidate &FC : CandSet) + OS << FC << '\n'; return OS; } -#if !defined(NDEBUG) static void printFusionCandidates(const FusionCandidateCollection &FusionCandidates) { dbgs() << "Fusion Candidates: \n"; -- cgit v1.1