From 8e64f0a64988df6e69f6aa847fec98d61d8c7fe3 Mon Sep 17 00:00:00 2001 From: Kit Barton Date: Thu, 25 Apr 2019 02:10:02 +0000 Subject: Fix unused variable warning in LoopFusion pass. Do not wrap the contents of printFusionCandidates in the LLVM_DEBUG macro. This fixes an unused variable warning generated when compiling without asserts but with -DENABLE_LLVM_DUMP. Differential Revision: https://reviews.llvm.org/D61035 llvm-svn: 359161 --- llvm/lib/Transforms/Scalar/LoopFuse.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 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 bf45e5a..0bc2bcf 100644 --- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp +++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp @@ -311,16 +311,14 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, return OS; } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +#if !defined(NDEBUG) static void printFusionCandidates(const FusionCandidateCollection &FusionCandidates) { - LLVM_DEBUG(dbgs() << "Fusion Candidates: \n"); + dbgs() << "Fusion Candidates: \n"; for (const auto &CandidateSet : FusionCandidates) { - LLVM_DEBUG({ - dbgs() << "*** Fusion Candidate Set ***\n"; - dbgs() << CandidateSet; - dbgs() << "****************************\n"; - }); + dbgs() << "*** Fusion Candidate Set ***\n"; + dbgs() << CandidateSet; + dbgs() << "****************************\n"; } } #endif -- cgit v1.1