[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)
commitff33a95ed44b9c146d3b58517717a4163b479b02
tree1a5ce9e0ec6d53b7fcd6bd3739919d19d432c4a5
parentd2662c32fbb8ded38cd48fea954aea66864eb37d
[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

llvm-svn: 337951
llvm/include/llvm/MC/MCAsmInfo.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/MC/MCAsmInfoCOFF.cpp
llvm/test/CodeGen/AArch64/win_cst_pool.ll
llvm/test/CodeGen/X86/win_cst_pool.ll