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: unassignedb...@nondot.org
          Reporter: simon.f.whitta...@gmail.com
                CC: ane...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to