<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt-viewer fails when debug info is dropped"
   href="https://bugs.llvm.org/show_bug.cgi?id=33764">33764</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt-viewer fails when debug info is dropped
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>opt-viewer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>simon.f.whittaker@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>anemet@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>