Index: llvm/trunk/tools/opt-viewer/opt-viewer.py =================================================================== --- llvm/trunk/tools/opt-viewer/opt-viewer.py +++ llvm/trunk/tools/opt-viewer/opt-viewer.py @@ -72,7 +72,10 @@ file_text = stream.read() if self.no_highlight: - html_highlighted = file_text.decode('utf-8') + if sys.version_info.major >= 3: + html_highlighted = file_text + else: + html_highlighted = file_text.decode('utf-8') else: html_highlighted = highlight( file_text,