[llvm-bugs] [Bug 33331] New: opt-viewer.py produces broken output for directories with spaces

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 6 11:36:51 PDT 2017


            Bug ID: 33331
           Summary: opt-viewer.py produces broken output for directories
                    with spaces
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          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

Created attachment 18583
  --> https://bugs.llvm.org/attachment.cgi?id=18583&action=edit
Patch fixing the href


as in the title, opt-viewer.py output produces broken links for input filename
which have spaces in their path.


<td class="column-entry-0"><a href=C:\Program Files
(x86)\SCE\foo.h.html#L846>C:\Program Files (x86)\SCE\foo.h:846:0</a></td>

I think the easiest fix is to modify optrecord.py to put quotes around the

 def make_link(File, Line):
-    return "{}#L{}".format(html_file_name(File), Line)
+    return "\"{}#L{}\"".format(html_file_name(File), Line)

Full patch attached.



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/20170606/5eee4e15/attachment.html>

More information about the llvm-bugs mailing list