[cfe-dev] Macro history (de-)serialization implementation, need help figuring out some things
matthieu.monrocq at gmail.com
Tue Sep 4 09:32:16 PDT 2012
On Tue, Sep 4, 2012 at 4:30 PM, Alexander Kornienko <alexfh at google.com>wrote:
> On Sat, Sep 1, 2012 at 12:50 PM, Matthieu Monrocq <
> matthieu.monrocq at gmail.com> wrote:
>> On Sat, Sep 1, 2012 at 1:36 AM, Alexander Kornienko <alexfh at google.com>wrote:
>>> I have a quick-and-dirty implementation of macro history
>>> (de-)serialization, but it is still not fully working. In particular, I
>>> still have to teach reading code to distinguish between identifiers that
>>> have macro definition currently, and those that had one before. I already
>>> taught ASTWriter to care about currently undefined macros, but I had to add
>>> HadMacro flag in IdentifierInfo for this purpose (hopefully there was one
>>> spare bit in 32-bit word for this).
>>> To complete this I have to gain much deeper understanding of things I'm
>>> changing, so I'd appreciate if someone explained me several things (or
>>> pointed me to the documentation if it exists): structure of PCH files and
>>> what is stored there, the idea behind chained PCHs and how they work, what
>>> are public/non-public macros (is it related to Objective C only?).
>> public/non-public macros (sorry, don't know about PCH):
>> I think it was introduced by Doug when he worked on the module system
>> (hopefully something for C++1x). The idea was that most macros could be
>> contained within a module (private macros) and only a specific few would be
>> declared so as to be exported.
> Thank you for the information. Maybe you know where to get any preliminary
> documentation on module system? Or any other information Doug may have used
> while implementing this?
I do not know if any documentation was published about it (sorry).
There are tests though:
http://llvm.org/svn/llvm-project/cfe/trunk/test/Modules/ which is always a
good starting point.
> Can anyone explain me the PCH part? Doug? Richard?
> -- Matthieu
>>> I'm writing this mainly to Douglas and Richard, as they have context of
>>> what I'm doing, but maybe someone else can help me with these things.
>>> Thanks in advance!
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev