[MSVC] Handle out-of-line definition of static data member correctly (fix for...
[MSVC] Handle out-of-line definition of static data member correctly (fix for http://llvm.org/PR21164), by Alexey Frolov There are 3 cases of defining static const member: initialized inside the class, not defined outside the class. initialized inside the class, defined outside the class. not initialized inside the class, defined outside the class. Revision r213304 was supposed to fix the linkage problem of case (1), but mistakenly it made case (2) behave the same. As a result, out-of-line definition of static data member is not handled correctly. Proposed patch distinguishes between cases (1) and (2) and allows to properly emit static const members under –fms-compatibility option. This fixes http://llvm.org/PR21164. Differential Revision: http://reviews.llvm.org/D9850 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237787 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
Loading
Please register or sign in to comment