Index: llvm/trunk/test/tools/opt-viewer/Inputs/basic/or.yaml =================================================================== --- llvm/trunk/test/tools/opt-viewer/Inputs/basic/or.yaml +++ llvm/trunk/test/tools/opt-viewer/Inputs/basic/or.yaml @@ -225,3 +225,14 @@ - InterleaveCount: '2' - String: ')' ... +--- !Passed +Pass: multiline +Name: ShowMultiLine +DebugLoc: { File: basic/or.c, Line: 10, Column: 3 } +Function: Test +Args: + - String: | + This is a remark with + multiple + lines +... Index: llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.h.html =================================================================== --- llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.h.html +++ llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.h.html @@ -4,6 +4,23 @@ +
Index: llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.c.html =================================================================== --- llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.c.html +++ llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.c.html @@ -4,6 +4,23 @@ +
@@ -106,6 +123,20 @@ + + +multiline +
  
+ This is a remark with  + +Test + + + 11 Index: llvm/trunk/test/tools/opt-viewer/Outputs/basic/index.html =================================================================== --- llvm/trunk/test/tools/opt-viewer/Outputs/basic/index.html +++ llvm/trunk/test/tools/opt-viewer/Outputs/basic/index.html @@ -29,121 +29,128 @@ -basic/or.c:14:3 +basic/or.c:10:3 Test -loop-unroll +multiline -basic/or.c:18:3 +basic/or.c:14:3 Test -inline +loop-unroll basic/or.c:18:3 Test -inline +inline -basic/or.c:20:3 +basic/or.c:18:3 Test -inline +inline basic/or.c:20:3 Test -inline +inline -basic/or.c:20:10 +basic/or.c:20:3 Test -inline +inline -basic/or.c:20:17 +basic/or.c:20:10 Test -inline +inline basic/or.c:20:17 Test -inline +inline -basic/or.h:5:3 +basic/or.c:20:17 -TestH -loop-vectorize +Test +inline -basic/or.h:9:3 +basic/or.h:5:3 TestH -loop-unroll +loop-vectorize -basic/or.h:13:3 +basic/or.h:9:3 TestH -inline +loop-unroll basic/or.h:13:3 TestH -inline +inline -basic/or.h:15:3 +basic/or.h:13:3 TestH -inline +inline basic/or.h:15:3 TestH -inline +inline -basic/or.h:15:10 +basic/or.h:15:3 TestH -inline +inline -basic/or.h:15:17 +basic/or.h:15:10 TestH -inline +inline basic/or.h:15:17 TestH +inline + + + +basic/or.h:15:17 + +TestH inline Index: llvm/trunk/test/tools/opt-viewer/Outputs/suppress/s.swift.html =================================================================== --- llvm/trunk/test/tools/opt-viewer/Outputs/suppress/s.swift.html +++ llvm/trunk/test/tools/opt-viewer/Outputs/suppress/s.swift.html @@ -4,6 +4,23 @@ +
Index: llvm/trunk/test/tools/opt-viewer/Outputs/unicode-function-name/s.swift.html =================================================================== --- llvm/trunk/test/tools/opt-viewer/Outputs/unicode-function-name/s.swift.html +++ llvm/trunk/test/tools/opt-viewer/Outputs/unicode-function-name/s.swift.html @@ -4,6 +4,23 @@ +
Index: llvm/trunk/tools/opt-viewer/opt-viewer.py =================================================================== --- llvm/trunk/tools/opt-viewer/opt-viewer.py +++ llvm/trunk/tools/opt-viewer/opt-viewer.py @@ -120,12 +120,26 @@ indent = line[:max(r.Column, 1) - 1] indent = re.sub('\S', ' ', indent) + # Create expanded message and link if we have a multiline message. + lines = r.message.split('\n') + if len(lines) > 1: + expand_link = '+' + message = lines[0] + expand_message = u''' +'''.format(indent, '\n'.join(lines[1:])) + else: + expand_link = '' + expand_message = '' + message = r.message print(u''' {r.RelativeHotness} {r.PassWithDiffPrefix} -
{indent}
{r.message}  +
{indent}
{expand_link} {message} {expand_message} {inlining_context} '''.format(**locals()), file=self.stream) @@ -139,6 +153,23 @@ +
Index: llvm/trunk/tools/opt-viewer/style.css =================================================================== --- llvm/trunk/tools/opt-viewer/style.css +++ llvm/trunk/tools/opt-viewer/style.css @@ -139,6 +139,16 @@ td:last-child { border-right: none; } +.expanded { + background-color: #f2f2f2; + padding-top: 5px; + padding-left: 5px; +} +.col-left { + float: left; + margin-bottom: -99999px; + padding-bottom: 99999px; +} /* Generated with pygmentize -S colorful -f html >> style.css */