summaryrefslogtreecommitdiffstats
path: root/llvm/utils/opt-viewer/opt-viewer.py
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/opt-viewer/opt-viewer.py')
-rwxr-xr-xllvm/utils/opt-viewer/opt-viewer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/opt-viewer/opt-viewer.py b/llvm/utils/opt-viewer/opt-viewer.py
index ee5c7b52e11..bc30618c854 100755
--- a/llvm/utils/opt-viewer/opt-viewer.py
+++ b/llvm/utils/opt-viewer/opt-viewer.py
@@ -275,8 +275,8 @@ for input_file in args.yaml_files:
f = open(input_file)
docs = yaml.load_all(f)
for remark in docs:
- # Avoid duplicated remarks
- if remark.key in all_remarks:
+ # Avoid remarks withoug debug location or if they are duplicated
+ if not hasattr(remark, 'DebugLoc') or remark.key in all_remarks:
continue
all_remarks[remark.key] = remark
OpenPOWER on IntegriCloud