Page MenuHomePhabricator

Serialize `#pragma comment`.

Authored by thakis on Mar 2 2016, 3:18 AM.



#pragma comment was handled by Sema calling a function on ASTConsumer, and CodeGen then implementing this function and writing things to its output.

Instead, introduce a PragmaCommentDecl AST node and hang one off the TranslationUnitDecl for every #pragma comment line, and then use the regular serialization machinery. (Since PragmaCommentDecl has codegen relevance, it's eagerly deserialized.)

Diff Detail

Event Timeline

thakis updated this revision to Diff 49594.Mar 2 2016, 3:18 AM
thakis retitled this revision from to Serialize `#pragma comment`..
thakis updated this object.
thakis added a reviewer: rnk.
thakis added a subscriber: cfe-commits.
rnk accepted this revision.Mar 2 2016, 8:05 AM
rnk edited edge metadata.


This revision is now accepted and ready to land.Mar 2 2016, 8:05 AM
thakis closed this revision.Mar 2 2016, 9:35 AM

r262493, thanks!

Also landed a very similar change for the very similar detect_mismatch pragma in r262506. (The other missing serialized pragmas will use a different approach.)