diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-02-20 12:45:43 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-02-20 12:45:43 +0000 |
commit | ae798ac3057a9d268293fb509131f414d579a111 (patch) | |
tree | 305855c30082cde270143671baa73b691e9a6bb1 /lib | |
parent | d535c7497ba16b93fc49b1587d10d32ea44e61a4 (diff) |
Merging r325576:
------------------------------------------------------------------------
r325576 | hans | 2018-02-20 13:43:02 +0100 (Tue, 20 Feb 2018) | 13 lines
Revert r325375 "[MS] Make constexpr static data members implicitly inline"
This broke Clang bootstrap on Windows, PR36453.
> This handles them exactly the same way that we handle const integral
> static data members with inline definitions, which is what MSVC does.
>
> As a follow-up, now that we have a way to mark variables inline in the
> AST, we should consider marking them implicitly inline there instead of
> only treating them as inline in CodeGen. Unfortunately, this breaks a
> lot of dllimport test cases, so that is future work for now.
>
> Fixes PR36125.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@325577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 94af21d4be..c73ae9efe1 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -5854,7 +5854,7 @@ CharUnits ASTContext::getObjCEncodingTypeSize(QualType type) const { bool ASTContext::isMSStaticDataMemberInlineDefinition(const VarDecl *VD) const { return getTargetInfo().getCXXABI().isMicrosoft() && VD->isStaticDataMember() && - (VD->getType()->isIntegralOrEnumerationType() || VD->isConstexpr()) && + VD->getType()->isIntegralOrEnumerationType() && !VD->getFirstDecl()->isOutOfLine() && VD->getFirstDecl()->hasInit(); } |