This is an archive of the discontinued LLVM Phabricator instance.

[FileCheck] Fix sphinx error: make input be gas block
ClosedPublic

Authored by thopre on May 14 2019, 6:06 AM.

Event Timeline

thopre created this revision.May 14 2019, 6:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 14 2019, 6:06 AM
thopre retitled this revision from Make input be text block to [FileCheck] Fix sphinx error: make input be text block.May 14 2019, 6:07 AM

I'm not sure I follow what this achieves. https://llvm.org/docs/CommandGuide/FileCheck.html looks okay to me.... I see the build bot failure. Can you point at documentation that indicates what the problem is?

I'm not sure I follow what this achieves. https://llvm.org/docs/CommandGuide/FileCheck.html looks okay to me.... I see the build bot failure. Can you point at documentation that indicates what the problem is?

The only documentation I can find is [1] and [2]. where the former mention that code-block:: llvm is for LLVM IR and the latter specifies that it is for syntax highlighting. The error message seems to corroborate that there is some sort of parsing of the block going on and the two block I'm chanking here are not LLVM IR but made up assembly. I am not able to reproduce the bug sadly (I did manage to reproduce the other one eventually FYI) so cannot get 100% sure it will fix the issue but [2] does mention that code-block:: test is a null parser that does not provide any syntax highlighting.

[1] llvm/docs/SphinxQuickstartTemplate.rst
[2] http://pygments.org/docs/lexers/

jhenderson added inline comments.May 14 2019, 6:50 AM
llvm/docs/CommandGuide/FileCheck.rst
596

Could you use gas/asm?

thopre marked an inline comment as done.May 14 2019, 7:11 AM
thopre added inline comments.
llvm/docs/CommandGuide/FileCheck.rst
596

I suppose since there isn't any directive but I wouldn't be able to check that it will build successfully.

thopre updated this revision to Diff 199602.May 15 2019, 6:46 AM
thopre marked an inline comment as done.

Use gas block instead of text

thopre retitled this revision from [FileCheck] Fix sphinx error: make input be text block to [FileCheck] Fix sphinx error: make input be gas block.May 15 2019, 6:47 AM
thopre edited the summary of this revision. (Show Details)
jhenderson accepted this revision.May 15 2019, 7:09 AM

LGTM. If gas doesn't work, feel free to change to text with no further review.

llvm/docs/CommandGuide/FileCheck.rst
596

Since this is generic assembly, my reading of http://pygments.org/docs/lexers/#pygments.lexers.asm.GasLexer is that this would be the best match, but I don't really know. It's easy enough to fix if that doesn't work though.

This revision is now accepted and ready to land.May 15 2019, 7:09 AM
This revision was automatically updated to reflect the committed changes.