[llvm] r307880 - [opt-viewer] Don't except when debug info is not available.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 21:19:13 PDT 2017
Author: davide
Date: Wed Jul 12 21:19:13 2017
New Revision: 307880
URL: http://llvm.org/viewvc/llvm-project?rev=307880&view=rev
Log:
[opt-viewer] Don't except when debug info is not available.
For records without DebugLoc we simply skip the caller location in
map_remarks.
Fixes PR33764.
Patch by Simon Whittaker!
Modified:
llvm/trunk/tools/opt-viewer/opt-viewer.py
Modified: llvm/trunk/tools/opt-viewer/opt-viewer.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt-viewer/opt-viewer.py?rev=307880&r1=307879&r2=307880&view=diff
==============================================================================
--- llvm/trunk/tools/opt-viewer/opt-viewer.py (original)
+++ llvm/trunk/tools/opt-viewer/opt-viewer.py Wed Jul 12 21:19:13 2017
@@ -178,7 +178,10 @@ def map_remarks(all_remarks):
for arg in remark.Args:
caller = arg.get('Caller')
if caller:
- context.caller_loc[caller] = arg['DebugLoc']
+ try:
+ context.caller_loc[caller] = arg['DebugLoc']
+ except KeyError:
+ pass
def generate_report(all_remarks,
More information about the llvm-commits
mailing list