]> granicus.if.org Git - clang/commit
c++ IRGen. In trivial cases that object is going into static
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 10 Jan 2013 23:28:43 +0000 (23:28 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 10 Jan 2013 23:28:43 +0000 (23:28 +0000)
commitc2316db5decd9cb7f8768ca67fad41fd8cffc110
tree7aa0007eff5027b8d0854ad1c5eb2c4eb197dc07
parent8e2999cd4cfcf6447ca1f6e41d5707305e2d8dd0
c++ IRGen. In trivial cases that object is going into static
storage and thus is implicitly zero-initialized, no need to
do C++11 memory model. This patch unconditionally detects
such condition and zeroinitializer's the variable.
Patch has been commented on and OKed by Doug off-line.
// rdar://12897704

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172144 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprConstant.cpp
test/CodeGenCXX/cxx11-trivial-initializer-struct.cpp [new file with mode: 0644]