[LLVMdev] CollectorRegistry

Simon Ask Ulsnes vinterbleg at gmail.com
Sat Jul 26 07:32:31 PDT 2008


2008/7/24 Gordon Henriksen <gordonhenriksen at me.com>:
>> OK, so for instance if I wanted to be able to use the GC from a C
>> frontend (presumably by using llvm_gc_allocate?), do the C functions
>> need this attribute as well?
>
> Yes.

I forgot I still needed an answer to my original question. :-P

So, I have to implement llvm_gc_initialize, llvm_gc_allocate, and
llvm_gc_collect (llvm_cg_walk_gcroots is provided by the Collector
framework, right?) -- in those methods, how do I access the Collector
object instantiated by LLVM?

(It appears I do have to implement them myself, since otherwise there
are unresolved symbols when I call them directly from my IR)

- Simon



More information about the llvm-dev mailing list