[llvm] 1123e03 - [opt-viewer] Use safe yaml load_all
Yi Kong via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 20 23:00:16 PDT 2021
Author: Yi Kong
Date: 2021-10-21T14:00:03+08:00
New Revision: 1123e03a9d9401c5203ae55bff533dd4d133d8d2
URL: https://github.com/llvm/llvm-project/commit/1123e03a9d9401c5203ae55bff533dd4d133d8d2
DIFF: https://github.com/llvm/llvm-project/commit/1123e03a9d9401c5203ae55bff533dd4d133d8d2.diff
LOG: [opt-viewer] Use safe yaml load_all
Differential Revision: https://reviews.llvm.org/D112075
Added:
Modified:
llvm/tools/opt-viewer/optrecord.py
Removed:
################################################################################
diff --git a/llvm/tools/opt-viewer/optrecord.py b/llvm/tools/opt-viewer/optrecord.py
index 6a53e13f4c2b8..bd5ef6c7393e9 100644
--- a/llvm/tools/opt-viewer/optrecord.py
+++ b/llvm/tools/opt-viewer/optrecord.py
@@ -274,7 +274,7 @@ def get_remarks(input_file, filter_=None):
file_remarks = defaultdict(functools.partial(defaultdict, list))
with io.open(input_file, encoding = 'utf-8') as f:
- docs = yaml.load_all(f, Loader=Loader)
+ docs = yaml.safe_load_all(f, Loader=Loader)
filter_e = None
if filter_:
More information about the llvm-commits
mailing list