[PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 11 10:16:14 PDT 2016


rnk added a comment.

Richard, do you think we should be handling this by rewriting the AST-level attribute in Sema or by changing our interpretation of things in CodeGen? We're already creating a bunch of implicit attributes to implement class-level import/export.


================
Comment at: lib/Sema/SemaDecl.cpp:5572
@@ -5567,2 +5571,3 @@
   bool IsInline = false, IsStaticDataMember = false, IsQualifiedFriend = false;
-  if (const auto *VD = dyn_cast<VarDecl>(NewDecl))
+  bool isMicrosoft = S.Context.getTargetInfo().getCXXABI().isMicrosoft();
+  if (const auto *VD = dyn_cast<VarDecl>(NewDecl)) {
----------------
To be consistent, this should be `IsMicrosoft`.


http://reviews.llvm.org/D18953





More information about the cfe-commits mailing list