[llvm] r286861 - [opt-viewer] Don't fail with remarks without debug location
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 10:38:48 PST 2016
Author: anemet
Date: Mon Nov 14 12:38:48 2016
New Revision: 286861
URL: http://llvm.org/viewvc/llvm-project?rev=286861&view=rev
Log:
[opt-viewer] Don't fail with remarks without debug location
Modified:
llvm/trunk/utils/opt-viewer/opt-viewer.py
Modified: llvm/trunk/utils/opt-viewer/opt-viewer.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/opt-viewer/opt-viewer.py?rev=286861&r1=286860&r2=286861&view=diff
==============================================================================
--- llvm/trunk/utils/opt-viewer/opt-viewer.py (original)
+++ llvm/trunk/utils/opt-viewer/opt-viewer.py Mon Nov 14 12:38:48 2016
@@ -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
More information about the llvm-commits
mailing list