[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!

llvm-svn: 307880
This commit is contained in:
Davide Italiano 2017-07-13 04:19:13 +00:00
parent b564df0f8b
commit 0df1e464f8

View File

@ -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,