[llvm-bugs] [Bug 33764] New: opt-viewer fails when debug info is dropped

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 12 14:41:21 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33764

            Bug ID: 33764
           Summary: opt-viewer fails when debug info is dropped
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt-viewer
          Assignee: unassignedbugs at nondot.org
          Reporter: simon.f.whittaker at gmail.com
                CC: anemet at apple.com, llvm-bugs at lists.llvm.org

For a reasonably complex project some of the optimization records produced by
-fsave-optimization-record have no debug location ('DebugLoc' field)

e.g.

--- !Passed
Pass:            inline
Name:            Inlined
Function:        _ZN33RenderingShaderBindingsStructDataC1ERKS_
Args:            
  - Callee:          _ZN33RenderingShaderBindingsStructDataC2ERKS_
  - String:          ' inlined into '
  - Caller:          _ZN33RenderingShaderBindingsStructDataC1ERKS_

in this scenario opt-viewer.py fails with:

  File "opt-viewer.py", line 251, in <module>
    map_remarks(all_remarks)
  File "opt-viewer.py", line 181, in map_remarks
    context.caller_loc[caller] = arg['DebugLoc']
KeyError: 'DebugLoc'

I think the easiest / safest solution is to ignore the DebugLoc for these
records, patch to follow.

Thanks,

Simon

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170712/b8ad66e6/attachment.html>


More information about the llvm-bugs mailing list