OSDN Git Service

[COFF] Use comdat shared constants for MinGW as well
authorMartin Storsjo <martin@martin.st>
Wed, 25 Jul 2018 18:35:42 +0000 (18:35 +0000)
committerMartin Storsjo <martin@martin.st>
Wed, 25 Jul 2018 18:35:42 +0000 (18:35 +0000)
commitf2f6b9cfe050bf47931f3d54967758c24de9fd59
treefb7972009a6c005ac3aa996f7c9e08c5c1d6c86c
parenta81fbf2f94ce68c319c25b3d5b2f4f388d0facc4
[COFF] Use comdat shared constants for MinGW as well

GNU binutils tools have no problems with this kind of shared constants,
provided that we actually hook it up completely in AsmPrinter and
produce a global symbol.

This effectively reverts SVN r335918 by hooking the rest of it up
properly.

This feature was implemented originally in SVN r213006, with no reason
for why it can't be used for MinGW other than the fact that GCC doesn't
do it while MSVC does.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337951 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCAsmInfo.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/MC/MCAsmInfoCOFF.cpp
test/CodeGen/AArch64/win_cst_pool.ll
test/CodeGen/X86/win_cst_pool.ll