Question about Doc patch

Howdy. I submitted a number of documentation patches to Chris, but he wanted your input on this one:

Also, is this correct:

%class.Array = type { %class.Object, i32, [0 x %class.Object*] }
? Wondering if it should be
%class.Array = type { %class.Object*, i32, [0 x %class.Object*] }

Not sure about this, please ask Gordon.

Now I can't remember where that is even, but it must be in the garbage collection doc.

It is correct as written. The idiomatic way to implement B inherits A in LLVM is

%B = type { %A, ... }

Also:

Can't get GC instruction to get thru llvm-as yet so I can't answer for myself :wink: Ack, took me an hour to figure out that an *intrinsic* needs a manual decl:
declare void @llvm.gcroot(i8 **, i8*)
Could you add that to the GC doc? just adding to code sample would help a lot. Not sure which is correct so I can't add (% or @)

I'd like to propose a patch to the documentation in the gcroot instruction area(s) that puts this

declare void @llvm.gcroot(i8 **, i8*)

in at least one of the examples. took me awhile to figure out I needed to declare that as a function. The term intrinsic made me think it was a built-in instruction.

Probably best would be to state that clearly in http://llvm.org/docs/LangRef.html#intrinsics and hyperlink the first instance of 'intrinsic' (within each section?) of GarbageCollection.html. Possibly add the terms 'declare' to each of the intrinsics documented at Garbage Collection with LLVM — LLVM 16.0.0git documentation.

— Gordon

Howdy. I submitted a number of documentation patches to Chris, but
he wanted your input on this one:

Also, is this correct:

%class.Array = type { %class.Object, i32, [0 x %class.Object*] }
? Wondering if it should be
%class.Array = type { %class.Object*, i32, [0 x %class.Object*] }

Not sure about this, please ask Gordon.

Now I can't remember where that is even, but it must be in the
garbage collection doc.

It is correct as written. The idiomatic way to implement B inherits A
in LLVM is

%B = type { %A, ... }

Ah! Ok, i thought that was a metclass pointer for a second there...but inheritance makes mucho sense there.

Probably best would be to state that clearly in http://llvm.org/docs/LangRef.html#intrinsics

and hyperlink the first instance of 'intrinsic' (within each
section?) of GarbageCollection.html. Possibly add the terms 'declare'
to each of the intrinsics documented at Garbage Collection with LLVM — LLVM 16.0.0git documentation
.

Sounds great!
THanks,
Ter