[opt-viewer] Suggest installing the faster parser (libYAML)

llvm-svn: 296553
This commit is contained in:
Adam Nemet 2017-03-01 00:54:40 +00:00
parent 20b3e9a835
commit 1eca59e8b7
1 changed files with 2 additions and 3 deletions

View File

@ -5,15 +5,14 @@ from __future__ import print_function
desc = '''Generate HTML output to visualize optimization records from the YAML files
generated with -fsave-optimization-record and -fdiagnostics-show-hotness.
The tools requires PyYAML and Pygments Python packages.
For faster parsing, you may want to use libYAML with PyYAML.'''
The tools requires PyYAML and Pygments Python packages.'''
import yaml
# Try to use the C parser.
try:
from yaml import CLoader as Loader
except ImportError:
print("For faster parsing, you may want to install libYAML for PyYAML")
from yaml import Loader
import functools