mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +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:
@ -43,7 +43,8 @@ public:
|
||||
|
||||
/// Given a constant with the SectionKind, return a section that it should be
|
||||
/// placed in.
|
||||
const MCSection *getSectionForConstant(SectionKind Kind) const override;
|
||||
const MCSection *getSectionForConstant(SectionKind Kind,
|
||||
const Constant *C) const override;
|
||||
|
||||
const MCSection *getExplicitSectionGlobal(const GlobalValue *GV,
|
||||
SectionKind Kind, Mangler &Mang,
|
||||
@ -100,7 +101,8 @@ public:
|
||||
SectionKind Kind, Mangler &Mang,
|
||||
const TargetMachine &TM) const override;
|
||||
|
||||
const MCSection *getSectionForConstant(SectionKind Kind) const override;
|
||||
const MCSection *getSectionForConstant(SectionKind Kind,
|
||||
const Constant *C) const override;
|
||||
|
||||
/// The mach-o version of this method defaults to returning a stub reference.
|
||||
const MCExpr *
|
||||
|
Reference in New Issue
Block a user