From bb367c14aea99ab744406f3e3a700186fd3f1ad6 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 5 Nov 2025 08:23:22 -0800 Subject: [PATCH] [polly] Fix unused variable warnings This patch fixes: polly/lib/Transform/ScheduleOptimizer.cpp:935:17: error: unused variable 'File' [-Werror,-Wunused-variable] polly/lib/Transform/ScheduleOptimizer.cpp:936:9: error: unused variable 'Line' [-Werror,-Wunused-variable] polly/lib/Transform/ScheduleOptimizer.cpp:937:17: error: unused variable 'Msg' [-Werror,-Wunused-variable] --- polly/lib/Transform/ScheduleOptimizer.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp index cb08397c201f..f01d3decd9a1 100644 --- a/polly/lib/Transform/ScheduleOptimizer.cpp +++ b/polly/lib/Transform/ScheduleOptimizer.cpp @@ -932,13 +932,14 @@ static void runIslScheduleOptimizer( POLLY_DEBUG(dbgs() << "Schedule optimizer calculation exceeds ISL quota\n"); return; } else if (isl_ctx_last_error(Ctx) != isl_error_none) { - const char *File = isl_ctx_last_error_file(Ctx); - int Line = isl_ctx_last_error_line(Ctx); - const char *Msg = isl_ctx_last_error_msg(Ctx); - POLLY_DEBUG( - dbgs() - << "ISL reported an error during the computation of a new schedule at " - << File << ":" << Line << ": " << Msg); + POLLY_DEBUG({ + const char *File = isl_ctx_last_error_file(Ctx); + int Line = isl_ctx_last_error_line(Ctx); + const char *Msg = isl_ctx_last_error_msg(Ctx); + dbgs() << "ISL reported an error during the computation of a new " + "schedule at " + << File << ":" << Line << ": " << Msg; + }); isl_ctx_reset_error(Ctx); return; } else if (Schedule.is_null()) {