[opt-viewer] Set title for the source pages
llvm-svn: 326125
This commit is contained in:
parent
cb651c05d6
commit
f7778892d2
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
<title>or.c</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<head>
|
<head>
|
||||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
<title>or.h</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<head>
|
<head>
|
||||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
<title>s.swift</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<head>
|
<head>
|
||||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
<title>s.swift</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<head>
|
<head>
|
||||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||||
|
|
|
@ -44,6 +44,7 @@ def suppress(remark):
|
||||||
|
|
||||||
class SourceFileRenderer:
|
class SourceFileRenderer:
|
||||||
def __init__(self, source_dir, output_dir, filename, no_highlight):
|
def __init__(self, source_dir, output_dir, filename, no_highlight):
|
||||||
|
self.filename = filename
|
||||||
existing_filename = None
|
existing_filename = None
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
existing_filename = filename
|
existing_filename = filename
|
||||||
|
@ -131,6 +132,7 @@ class SourceFileRenderer:
|
||||||
|
|
||||||
print('''
|
print('''
|
||||||
<html>
|
<html>
|
||||||
|
<title>{}</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<head>
|
<head>
|
||||||
<link rel='stylesheet' type='text/css' href='style.css'>
|
<link rel='stylesheet' type='text/css' href='style.css'>
|
||||||
|
@ -147,7 +149,7 @@ class SourceFileRenderer:
|
||||||
<th style="width: 15%">Inline Context</td>
|
<th style="width: 15%">Inline Context</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>''', file=self.stream)
|
<tbody>'''.format(os.path.basename(self.filename)), file=self.stream)
|
||||||
self.render_source_lines(self.source_stream, line_remarks)
|
self.render_source_lines(self.source_stream, line_remarks)
|
||||||
|
|
||||||
print('''
|
print('''
|
||||||
|
|
Loading…
Reference in New Issue