summaryrefslogtreecommitdiffstats
path: root/llvm/utils/opt-viewer/opt-viewer.py
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2016-11-14 18:38:48 +0000
committerAdam Nemet <anemet@apple.com>2016-11-14 18:38:48 +0000
commit544220fc0b31b4cc95aa183a20ef91922aeab7b7 (patch)
treea99e00c7817e90b5675f1b04a5f558c8053eb24d /llvm/utils/opt-viewer/opt-viewer.py
parent8236fe103f051eac41ff23f6684578b5e31c9871 (diff)
downloadbcm5719-llvm-544220fc0b31b4cc95aa183a20ef91922aeab7b7.tar.gz
bcm5719-llvm-544220fc0b31b4cc95aa183a20ef91922aeab7b7.zip
[opt-viewer] Don't fail with remarks without debug location
llvm-svn: 286861
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