[PATCH] CodeGen: Make constant emission of arrays and structs more aggressive.

Benjamin Kramer benny.kra at gmail.com
Sat Mar 7 09:55:02 PST 2015


Hi rsmith,

The limitation to POD types stems from the times when our constant emission
logic was way less sophisticated and much more buggy. Emit all constant
initializers as LLVM constants.

This reuses the logic for static vars, so assert that we don't accidentally
introduce a static initializer. I tried to cover the issues mentioned in the
commit with additional test cases.

http://reviews.llvm.org/D8137

Files:
  lib/CodeGen/CGDecl.cpp
  test/CodeGenCXX/const-init-cxx11.cpp
  test/CodeGenCXX/const-init.cpp
  test/CodeGenCXX/member-init-anon-union.cpp
  test/CodeGenCXX/microsoft-interface.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8137.21423.patch
Type: text/x-patch
Size: 4262 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150307/8f59a780/attachment.bin>


More information about the cfe-commits mailing list