[LLVMdev] CollectorRegistry

Simon Ask Ulsnes vinterbleg at gmail.com
Wed Jul 23 05:58:32 PDT 2008


Hey,

I am a bit confused about the CollectorRegistry.

I am attempting to write a garbage collector for LLVM, and the tiny
example in the docs at
http://llvm.org/releases/2.3/docs/GarbageCollection.html gives this
line:

   CollectorRegistry::Add<MyCollector> X("mygc", "My bespoke garbage
collector.");

My question is now: Am I supposed to instantiate my collector
manually, and tell LLVM about it, or can the Registry instantiate it,
and it that case, how to go about that? I haven't been able to deduce
a way to get a pointer to my collector from the doxygen docs or the
header files, so I hope that you can help me here. :-)

Yours,
Simon



More information about the llvm-dev mailing list