From 0b680d241d00942e428d5032eccf63b58cc22b3e Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 24 Aug 2019 02:50:42 +0000 Subject: [PATCH] [LoopFusion] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369836 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopFuse.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Transforms/Scalar/LoopFuse.cpp b/lib/Transforms/Scalar/LoopFuse.cpp index 704a71e1c5c..3892d09bc7d 100644 --- a/lib/Transforms/Scalar/LoopFuse.cpp +++ b/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"; -- 2.40.0