summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xllvm/tools/opt-viewer/opt-viewer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/opt-viewer/opt-viewer.py b/llvm/tools/opt-viewer/opt-viewer.py
index 5e5daf7feb0..e6dd6a0286f 100755
--- a/llvm/tools/opt-viewer/opt-viewer.py
+++ b/llvm/tools/opt-viewer/opt-viewer.py
@@ -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,
OpenPOWER on IntegriCloud