]> granicus.if.org Git - clang/commit
[MS ABI] Fix mangling issue with dynamic initializer stubs.
authorZachary Turner <zturner@google.com>
Thu, 30 Aug 2018 20:53:11 +0000 (20:53 +0000)
committerZachary Turner <zturner@google.com>
Thu, 30 Aug 2018 20:53:11 +0000 (20:53 +0000)
commitf6b7bbdfa19165a5508efd40183e42bcf481d346
treefe3cc4b5e94e840c07567592c9b23c42613c1191
parentdfb6e35a902419c2ef3df22328e66a2c3627b16f
[MS ABI] Fix mangling issue with dynamic initializer stubs.

There are two types of dynamic initializer stubs.  There's

  `dynamic initializer for 'x''(void)

and

  `dynamic initializer for `static Foo::Bar StaticDataMember''(void)

The second case is disambiguated from the first by the presence of
a ? after the operator code.  So the first will appear something like
?__E<name> while the second will appear something like ?__E?<name>.
clang-cl was mangling these both the same though.  This patch
matches behavior with cl.

Differential Revision: https://reviews.llvm.org/D51500

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341117 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/MicrosoftMangle.cpp
test/CodeGenCXX/microsoft-abi-static-initializers.cpp
test/CodeGenCXX/pragma-init_seg.cpp