summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXXABI.h
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/CGCXXABI.h
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/CGCXXABI.h')
-rw-r--r--clang/lib/CodeGen/CGCXXABI.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h
index 44bdf66f603..9e9a2a7aaf9 100644
--- a/clang/lib/CodeGen/CGCXXABI.h
+++ b/clang/lib/CodeGen/CGCXXABI.h
@@ -373,6 +373,10 @@ public:
/// Gets the deleted virtual member call name.
virtual StringRef GetDeletedVirtualCallName() = 0;
+ /// \brief Returns true iff static data members that are initialized in the
+ /// class definition should have linkonce linkage.
+ virtual bool isInlineInitializedStaticDataMemberLinkOnce() { return false; }
+
/**************************** Array cookies ******************************/
/// Returns the extra size required in order to store the array
OpenPOWER on IntegriCloud