Use has_value instead of hasValue (NFC)

GitOrigin-RevId: e5f568a49f2bbc69a1fc30be818613e0c7fe0499
diff --git a/lib/Exchange/JSONExporter.cpp b/lib/Exchange/JSONExporter.cpp
index e92055b..ca9c1b8 100644
--- a/lib/Exchange/JSONExporter.cpp
+++ b/lib/Exchange/JSONExporter.cpp
@@ -290,7 +290,7 @@
     }
     Optional<StringRef> Schedule =
         statements[Index].getAsObject()->getString("schedule");
-    assert(Schedule.hasValue() &&
+    assert(Schedule.has_value() &&
            "Schedules that contain extension nodes require special handling.");
     isl_map *Map = isl_map_read_from_str(S.getIslCtx().get(),
                                          Schedule.getValue().str().c_str());