summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-11-21 00:15:56 +0000
committerHans Wennborg <hans@hanshq.net>2013-11-21 00:15:56 +0000
commitfeedf8515b72343426959fd708460db957c4c285 (patch)
treecc085a9a8288a3f06e59d3a1c80fbc63814620b7 /clang/lib/CodeGen/MicrosoftCXXABI.cpp
parent9c9d7d14d1b53d4147d9438ab3bc3f13ce23dd43 (diff)
downloadbcm5719-llvm-feedf8515b72343426959fd708460db957c4c285.tar.gz
bcm5719-llvm-feedf8515b72343426959fd708460db957c4c285.zip
[-cxx-abi microsoft] Emit linkonce_odr definitions for declarations of static data members with inline initializers (PR17689)
This makes Clang emit a linkonce_odr definition for 'val' in the code below, to be compatible with MSVC-compiled code: struct Foo { static const int val = 1; }; Differential Revision: http://llvm-reviews.chandlerc.com/D2233 llvm-svn: 195283
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 4a02d4da51a..ee928c5b590 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -50,6 +50,8 @@ public:
// arbitrary.
StringRef GetDeletedVirtualCallName() { return "_purecall"; }
+ bool isInlineInitializedStaticDataMemberLinkOnce() { return true; }
+
llvm::Value *adjustToCompleteObject(CodeGenFunction &CGF,
llvm::Value *ptr,
QualType type);
OpenPOWER on IntegriCloud