Set normal LLVM function attributes on global initializer functions
authorReid Kleckner <reid@kleckner.net>
Wed, 22 Apr 2015 19:37:32 +0000 (19:37 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 22 Apr 2015 19:37:32 +0000 (19:37 +0000)
commit787dc438c9ce4614ed58527a5a41e548de813406
tree31dd0960cd5143edcc031395ee73e5d37fe607c7
parent61ad9d84df57837ac7619430c39a1d2f776f2102
Set normal LLVM function attributes on global initializer functions

Otherwise -fno-omit-frame-pointer and other flags like it aren't
applied.

Basic idea taken from Gao's patch, thanks!

Differential Revision: http://reviews.llvm.org/D9203

llvm-svn: 235537
clang/lib/CodeGen/CGDeclCXX.cpp
clang/test/CodeGenCXX/global-dtor-no-atexit.cpp
clang/test/CodeGenCXX/global-init.cpp