[PATCH] D48426: [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801)

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 21 13:30:30 PDT 2018


rnk added a subscriber: dblaikie.
rnk added a comment.

`LangOpts.ModulesCodegen` is very related in spirit to this, but I think we need a distinct option because that was designed to handle all inline functions (too much), not just dllexport inline functions. + @dblaikie



================
Comment at: include/clang/AST/ASTContext.h:2886-2887
+
+  // XXX: I don't like adding this to ASTContext, but I ran out of ideas for how ASTContext::DeclMustBeEmitted() would know about it otherwise.
+  bool BuildingPCHWithObjectFile = false;
 };
----------------
Does `LangOpts.CompilingPCH` do the right thing, or is that also true when we make a PCH with no object file? In any case, I'd probably make this a langopt. Even if it's functionally different from ModulesCodegen and ModulesDebugInfo, it's the same basic idea.


https://reviews.llvm.org/D48426





More information about the cfe-commits mailing list