mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
CodeGen: Stick constant pool entries in COMDAT sections for WinCOFF
COFF lacks a feature that other object file formats support: mergeable sections. To work around this, MSVC sticks constant pool entries in special COMDAT sections so that each constant is in it's own section. This permits unused constants to be dropped and it also allows duplicate constants in different translation units to get merged together. This fixes PR20262. Differential Revision: http://reviews.llvm.org/D4482 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213006 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -70,7 +70,8 @@ public:
|
||||
|
||||
/// Given a constant with the SectionKind, return a section that it should be
|
||||
/// placed in.
|
||||
virtual const MCSection *getSectionForConstant(SectionKind Kind) const;
|
||||
virtual const MCSection *getSectionForConstant(SectionKind Kind,
|
||||
const Constant *C) const;
|
||||
|
||||
/// Classify the specified global variable into a set of target independent
|
||||
/// categories embodied in SectionKind.
|
||||
|
Reference in New Issue
Block a user