This is an archive of the discontinued LLVM Phabricator instance.

Missing syntax highlighting for LLVM IR in Langref
ClosedPublic

Authored by sushmaunnibhavi on Apr 8 2021, 9:38 AM.

Diff Detail

Event Timeline

sushmaunnibhavi created this revision.Apr 8 2021, 9:38 AM
sushmaunnibhavi requested review of this revision.Apr 8 2021, 9:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2021, 9:38 AM
fhahn added a subscriber: fhahn.Apr 8 2021, 10:24 AM

Thanks for the patch! But do we do that for the other instruction syntax blocks as well? AFAICT the syntax blocks are not valid IR (due to the <> blocks) and .. code-block:: llvm is only used for examples with valid IR?

xgupta added a subscriber: xgupta.Apr 8 2021, 10:16 PM

I think Comdats, Prologue Data, Preallocated Operand Bundles, Use-list Order Directives, Undefined Values, Metadata Nodes and Metadata Strings, DICompileUnit, DIFile, DIBaiscType, DI ... etc, callback, associated metadata, annotation, C type width Module Flags Metadata, Automatic Linker Flags Named Metadata, Params, callbr, callswitch, bitcast, etc ... have example section that needs LLVM syntax highlighting.
But please check that they are valid LLVM IR examples or not. Like variable name (called virtual register) that we can assign value start from % not <

You may take the help from the tutorial on LLVM IR recorded during the 2019 EuroLLVM Developers’ Meeting.

Also please change the title to Missing syntax highlighting for LLVM IR in Langref as mention in the bug report with [Docs] tag.

I think Comdats, Prologue Data, Preallocated Operand Bundles, Use-list Order Directives, Undefined Values, Metadata Nodes and Metadata Strings, DICompileUnit, DIFile, DIBaiscType, DI ... etc, callback, associated metadata, annotation, C type width Module Flags Metadata, Automatic Linker Flags Named Metadata, Params, callbr, callswitch, bitcast, etc ... have example section that needs LLVM syntax highlighting.
But please check that they are valid LLVM IR examples or not. Like variable name (called virtual register) that we can assign value start from % not <

You may take the help from the tutorial on LLVM IR recorded during the 2019 EuroLLVM Developers’ Meeting.

Yes, I will look into it.

sushmaunnibhavi retitled this revision from Fixed bug issue #16122 to Missing syntax highlighting for LLVM IR in Langref.
sushmaunnibhavi edited the summary of this revision. (Show Details)

Added missing syntax highlighting

xgupta accepted this revision.Apr 10 2021, 11:48 PM

LGTM

This revision is now accepted and ready to land.Apr 10 2021, 11:48 PM
This revision was automatically updated to reflect the committed changes.