]> granicus.if.org Git - clang/commit
Serialize `#pragma comment`.
authorNico Weber <nicolasweber@gmx.de>
Wed, 2 Mar 2016 17:28:48 +0000 (17:28 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 2 Mar 2016 17:28:48 +0000 (17:28 +0000)
commit5a333e954bbf581c26df310194df2001d2aa6b3f
treef19931e00926b6f3cfe83f1c802b66b55d54ab9e
parent98b045b5e6e7ec686e36ac700d5922268d683c8a
Serialize `#pragma comment`.

`#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.)

http://reviews.llvm.org/D17799

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262493 91177308-0d34-0410-b5e6-96231b3b80d8
25 files changed:
include/clang/AST/ASTConsumer.h
include/clang/AST/Decl.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/Basic/DeclNodes.td
include/clang/Basic/PragmaKinds.h [new file with mode: 0644]
include/clang/Frontend/MultiplexConsumer.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/ASTContext.cpp
lib/AST/ASTDumper.cpp
lib/AST/Decl.cpp
lib/AST/DeclBase.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenAction.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/ModuleBuilder.cpp
lib/Frontend/MultiplexConsumer.cpp
lib/Parse/ParsePragma.cpp
lib/Sema/SemaAttr.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Serialization/ASTCommon.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/PCH/pragma-comment.c [new file with mode: 0644]
tools/libclang/CIndex.cpp