[PATCH] CodeGen: Stick constant pool entries in COMDAT sections for WinCOFF
Jim Grosbach
grosbach at apple.com
Mon Jul 14 15:39:05 PDT 2014
Rather terrifying how MSVC does this stuff, but patch LGTM.
Minor nit inline.
================
Comment at: lib/Target/X86/X86TargetObjectFile.cpp:165
@@ +164,3 @@
+ COFF::IMAGE_COMDAT_SELECT_ANY));
+ MCSymbol *Sym = S->getCOMDATSymbol();
+ return S;
----------------
"Sym" is unused.
I think you can just directly do:
```
return getContext().getCOFFSection(".rdata", Characteristics, Kind, COMDATSymName, COFF::IMAGE_COMDAT_SELECT_ANY));
```
http://reviews.llvm.org/D4482
More information about the llvm-commits
mailing list