]> granicus.if.org Git - clang/commit
In C++, allow us to emit a global as 'constant' even if it has class
authorDouglas Gregor <dgregor@apple.com>
Sat, 7 May 2011 22:06:45 +0000 (22:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 7 May 2011 22:06:45 +0000 (22:06 +0000)
commitda55074866ca2fe7f718c5d3334648d6e340fb15
treeaef4e95b1097d07fc114db78c6705d23f07f7d05
parent6f0877744517fa1daf3ac9d2e5c63c9acfcfa562
In C++, allow us to emit a global as 'constant' even if it has class
type, so long as it is known to have a constant initializer and the
class type is a POD class. Fixes <rdar://problem/9306265>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131060 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCXX/global-llvm-constant.cpp