Here is a patch that cleans up a couple of bugs and makes what I think
are a couple of small improvements based on the recent advice about
structs that I got. There is more like this that could be done, but I
wanted to see how this example was received.
LangRef.struct.patch (1.59 KB)
Awesome, thanks! Committed as r93170 with the following change:
s/local variables/registers/. "Local variable" refers to allocas in
LLVM, rather than %whatever SSA "variables".
Excellent. I was not actually happy with that term when I wrote it, but
wasn't sure of the standard terminology. It should certainly be
consistent, and that way makes more sense.
If these patches are useful I'll send more, but I should know one thing.
I notice that the example code in the LangRef is not formatted
consistently; sometimes in a grey box, sometimes just inline. My guess
is the preferred format changed at some point and older ones are just
not updated yet. I left the format as I found it this time, but tell me
which is preferred and I'll try to always put examples in the newer format.
My guess is the preferred format is the grey boxes. Text criticism says
that texts evolve toward greater complexity, not less, and I suspect
that is as true of technical documentation as it is of three thousand
year old Hebrew.
Patches that make the docs easier to understand are definitely useful.
I'm not sure about the desired state for example code. I'd probably
leave things the way you find them.
Grey boxes are fine with me,
OK, until told differently I will assume that the preferred outcome is
for all code examples I touch to be put in that format if they aren't