summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2017-07-18 19:25:34 +0000
committerBrian Gesiak <modocache@gmail.com>2017-07-18 19:25:34 +0000
commita88699706b97d042ccd3c8ce2d43f321c657b4d2 (patch)
tree4baad336110485caf2d2f0ddea2c5562bc9a1691 /llvm
parent42bea018af0451aafacbbdf77f4cbc311550da54 (diff)
downloadbcm5719-llvm-a88699706b97d042ccd3c8ce2d43f321c657b4d2.tar.gz
bcm5719-llvm-a88699706b97d042ccd3c8ce2d43f321c657b4d2.zip
[opt-viewer] Handle file names that contain '#'
Summary: When using opt-viewer.py with files with '#' in their name, such as 'foo#bar.cpp', opt-viewer.py would generate links such as '/path/to/foo#bar.cpp.opt.yaml#L42'. In this case, the link is interpreted by browsers as a link to the file '/path/to/foo', and to the section within that file with ID 'bar.cpp.opt.yaml#L42'. To work around this issue, replace '#' with '_' in file names and links in opt-viewer.py. Reviewers: anemet, davidxl Reviewed By: davidxl Subscribers: llvm-commits, fhahn Differential Revision: https://reviews.llvm.org/D34646 llvm-svn: 308346
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/opt-viewer/optrecord.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/opt-viewer/optrecord.py b/llvm/tools/opt-viewer/optrecord.py
index 6f6537ab055..4599e12d7e6 100644
--- a/llvm/tools/opt-viewer/optrecord.py
+++ b/llvm/tools/opt-viewer/optrecord.py
@@ -49,7 +49,7 @@ def demangle(name):
def html_file_name(filename):
- return filename.replace('/', '_') + ".html"
+ return filename.replace('/', '_').replace('#', '_') + ".html"
def make_link(File, Line):
OpenPOWER on IntegriCloud