mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-28 14:10:55 +00:00
[opt-viewer] Set title for the source pages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b857c139e
commit
2ee19a308f
@ -1,5 +1,6 @@
|
||||
|
||||
<html>
|
||||
<title>or.c</title>
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
<html>
|
||||
<title>or.h</title>
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
<html>
|
||||
<title>s.swift</title>
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
<html>
|
||||
<title>s.swift</title>
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
|
@ -44,6 +44,7 @@ def suppress(remark):
|
||||
|
||||
class SourceFileRenderer:
|
||||
def __init__(self, source_dir, output_dir, filename, no_highlight):
|
||||
self.filename = filename
|
||||
existing_filename = None
|
||||
if os.path.exists(filename):
|
||||
existing_filename = filename
|
||||
@ -131,6 +132,7 @@ class SourceFileRenderer:
|
||||
|
||||
print('''
|
||||
<html>
|
||||
<title>{}</title>
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||
@ -147,7 +149,7 @@ class SourceFileRenderer:
|
||||
<th style="width: 15%">Inline Context</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>''', file=self.stream)
|
||||
<tbody>'''.format(os.path.basename(self.filename)), file=self.stream)
|
||||
self.render_source_lines(self.source_stream, line_remarks)
|
||||
|
||||
print('''
|
||||
|
Loading…
Reference in New Issue
Block a user