[LLVMdev] tblgen internals

Garrison Venn gvenn.cfe.dev at gmail.com
Thu Dec 9 04:50:46 PST 2010


Is there a reason that RecordKeeper:: getAllDerivedDefinitions(...) implementation 
accesses the global Records instance instead of just referencing itself?

As far as I can tell from the usage:

1) Records has the linkage as extern RecordKeeper Records in Record.h
2) Is instantiated as a global in TableGen
3) All llvm uses of getAllDerivedDefinitions SEEM to be manifested as a 
message to this global RecordKeeper

In short getAllDerivedDefinitions(...) sort of (non-static) treats RecordKeeper 
as a singleton but it is never accessed this way. It is always accessed via
the global: Records.

Pointers to what I'm missing would be helpful.

Thanks in advance

Garrison
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101209/1684a5e4/attachment.html>


More information about the llvm-dev mailing list