diff options
author | Nico Weber <nicolasweber@gmx.de> | 2016-03-02 17:28:48 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2016-03-02 17:28:48 +0000 |
commit | 6622029d5ee15bfddacbda4825804ee89f8c30e6 (patch) | |
tree | bb7f94cffd80e3d0572c3f372ef4e68f57ee2ce9 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 3ca9ee0c537768b92087f24d2609756ba72cda4f (diff) | |
download | bcm5719-llvm-6622029d5ee15bfddacbda4825804ee89f8c30e6.tar.gz bcm5719-llvm-6622029d5ee15bfddacbda4825804ee89f8c30e6.zip |
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
llvm-svn: 262493
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index fdf1c73bfc6..844bdd1fa07 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -334,6 +334,11 @@ TemplateDeclInstantiator::VisitTranslationUnitDecl(TranslationUnitDecl *D) { } Decl * +TemplateDeclInstantiator::VisitPragmaCommentDecl(PragmaCommentDecl *D) { + llvm_unreachable("pragma comment cannot be instantiated"); +} + +Decl * TemplateDeclInstantiator::VisitExternCContextDecl(ExternCContextDecl *D) { llvm_unreachable("extern \"C\" context cannot be instantiated"); } |