aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-03-02 17:28:48 +0000
committerNico Weber <nicolasweber@gmx.de>2016-03-02 17:28:48 +0000
commit6622029d5ee15bfddacbda4825804ee89f8c30e6 (patch)
treebb7f94cffd80e3d0572c3f372ef4e68f57ee2ce9 /clang/lib/CodeGen/ModuleBuilder.cpp
parent3ca9ee0c537768b92087f24d2609756ba72cda4f (diff)
downloadllvm-6622029d5ee15bfddacbda4825804ee89f8c30e6.zip
llvm-6622029d5ee15bfddacbda4825804ee89f8c30e6.tar.gz
llvm-6622029d5ee15bfddacbda4825804ee89f8c30e6.tar.bz2
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/CodeGen/ModuleBuilder.cpp')
-rw-r--r--clang/lib/CodeGen/ModuleBuilder.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp
index 234a773..968cc46 100644
--- a/clang/lib/CodeGen/ModuleBuilder.cpp
+++ b/clang/lib/CodeGen/ModuleBuilder.cpp
@@ -104,9 +104,9 @@ namespace {
*M, Diags, CoverageInfo));
for (auto &&Lib : CodeGenOpts.DependentLibraries)
- HandleDependentLibrary(Lib);
+ Builder->AddDependentLib(Lib);
for (auto &&Opt : CodeGenOpts.LinkerOptions)
- HandleLinkerOption(Opt);
+ Builder->AppendLinkerOptions(Opt);
}
void HandleCXXStaticMemberVarInstantiation(VarDecl *VD) override {
@@ -234,18 +234,10 @@ namespace {
Builder->EmitVTable(RD);
}
- void HandleLinkerOption(llvm::StringRef Opts) override {
- Builder->AppendLinkerOptions(Opts);
- }
-
void HandleDetectMismatch(llvm::StringRef Name,
llvm::StringRef Value) override {
Builder->AddDetectMismatch(Name, Value);
}
-
- void HandleDependentLibrary(llvm::StringRef Lib) override {
- Builder->AddDependentLib(Lib);
- }
};
}