[polly] bb367c1 - [polly] Fix unused variable warnings

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 08:23:29 PST 2025


Author: Kazu Hirata
Date: 2025-11-05T08:23:22-08:00
New Revision: bb367c14aea99ab744406f3e3a700186fd3f1ad6

URL: https://github.com/llvm/llvm-project/commit/bb367c14aea99ab744406f3e3a700186fd3f1ad6
DIFF: https://github.com/llvm/llvm-project/commit/bb367c14aea99ab744406f3e3a700186fd3f1ad6.diff

LOG: [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]

Added: 
    

Modified: 
    polly/lib/Transform/ScheduleOptimizer.cpp

Removed: 
    


################################################################################
diff  --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp
index cb08397c201f2..f01d3decd9a1c 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()) {


        


More information about the llvm-commits mailing list