[PATCH] D60912: MS ABI: handle inline static data member as template static data member

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 13:19:40 PDT 2019


rnk added a comment.

In D60912#1472986 <https://reviews.llvm.org/D60912#1472986>, @jyu2 wrote:

> inline static int aoo = foo(); // C++17 inline variable, thus also a definition


This is a `static inline` global variable, so it technically creates two different globals, so calling foo twice is intended behavior. I think we really want to look at the GVA linkage instead of trying to list all the reasons why something might have weak linkage. Take a look at `shouldBeInCOMDAT` in CodeGenModule.cpp, I think it has the logic we want.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60912/new/

https://reviews.llvm.org/D60912





More information about the cfe-commits mailing list