[opt-viewer] Flush stdout after progress update

Without this, there was no progress shown during parsing but only during
rendering on macOS.

llvm-svn: 308000
diff --git a/llvm/tools/opt-viewer/optpmap.py b/llvm/tools/opt-viewer/optpmap.py
index 01e848e..16cb22e 100644
--- a/llvm/tools/opt-viewer/optpmap.py
+++ b/llvm/tools/opt-viewer/optpmap.py
@@ -20,6 +20,7 @@
         with _current.get_lock():
             _current.value += 1
         sys.stdout.write('\r\t{} of {}'.format(_current.value, _total.value))
+        sys.stdout.flush()
 
     return func(argument)