[Polly] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds

GitOrigin-RevId: 927050af532611dfbb62c2bace1a20fec1b348ee
diff --git a/lib/Transform/ScheduleOptimizer.cpp b/lib/Transform/ScheduleOptimizer.cpp
index acdfde1..9138289 100644
--- a/lib/Transform/ScheduleOptimizer.cpp
+++ b/lib/Transform/ScheduleOptimizer.cpp
@@ -1723,6 +1723,7 @@
 
 char IslScheduleOptimizerWrapperPass::ID = 0;
 
+#ifndef NDEBUG
 static void printSchedule(llvm::raw_ostream &OS, const isl::schedule &Schedule,
                           StringRef Desc) {
   isl::ctx Ctx = Schedule.get_ctx();
@@ -1734,6 +1735,7 @@
   free(Str);
   isl_printer_free(P);
 }
+#endif
 
 /// Collect statistics for the schedule tree.
 ///