This is an archive of the discontinued LLVM Phabricator instance.

Added example for integer constant [DOCS]
AbandonedPublic

Authored by sushmaunnibhavi on Apr 17 2021, 11:19 AM.

Diff Detail

Event Timeline

sushmaunnibhavi requested review of this revision.Apr 17 2021, 11:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2021, 11:19 AM
xgupta accepted this revision.Apr 17 2021, 12:09 PM
xgupta added a subscriber: aqjune.

LGTM, But also adding @aqjune as a second reviewer.

Would you please also add the example for Boolean, Float-Point, Null pointer, and Token constant so the Simple Constants section looks complete?
Feel free to ask if you can't find their examples in test cases.

This revision is now accepted and ready to land.Apr 17 2021, 12:09 PM

Also please update the title to include a tag like for this one [Docs].

Hi,

Would you explain what this patch is for?

I think add %in, 1 isn't constant... it is an instruction.

Hi,

Would you explain what this patch is for?

I think add %in, 1 isn't constant... it is an instruction.

Actually, this patch is for adding examples for the simple constants section in Langref.

sushmaunnibhavi retitled this revision from Added example for integer constant to Added example for integer constant [DOCS].Apr 17 2021, 11:39 PM

I'm not sure whether this is a good direction - adding one example for each item might be pretty verbose considering that they are basic constructs.
What about having a code snippet that includes all of these types (including integers) after There are no constants of type x86_mmx.?

+ Adding reviewers who are working as reviewers for LangRef patches

nikic added a subscriber: nikic.Apr 18 2021, 2:07 AM

Yeah, this doesn't look particularly useful to me.

Something I'd love to see though is a listing of special values for all floating point types. Always takes me a while to figure out how to test various inf/nan/sz for different float types, with their encoding peculiarities.

xgupta resigned from this revision.May 12 2021, 9:35 AM
This revision now requires review to proceed.May 12 2021, 9:35 AM
sushmaunnibhavi abandoned this revision.May 12 2021, 9:29 PM