summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetObjectFile.h
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-07-14 22:57:27 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-07-14 22:57:27 +0000
commit8bce66b09392b03ef73e0db8419dfd42aaf73c82 (patch)
tree2b9e0581fb34175f3e7862c3a4f9b2b505eb70d1 /llvm/lib/Target/X86/X86TargetObjectFile.h
parent2034ac81816d6de20b9e0253a6a2a09414571e0e (diff)
downloadbcm5719-llvm-8bce66b09392b03ef73e0db8419dfd42aaf73c82.tar.gz
bcm5719-llvm-8bce66b09392b03ef73e0db8419dfd42aaf73c82.zip
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 llvm-svn: 213006
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetObjectFile.h')
-rw-r--r--llvm/lib/Target/X86/X86TargetObjectFile.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.h b/llvm/lib/Target/X86/X86TargetObjectFile.h
index a08ed09ffb9..4a10b7ea6b4 100644
--- a/llvm/lib/Target/X86/X86TargetObjectFile.h
+++ b/llvm/lib/Target/X86/X86TargetObjectFile.h
@@ -46,6 +46,11 @@ namespace llvm {
const MCExpr *
getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
const TargetMachine &TM) const override;
+
+ /// \brief Given a mergeable constant with the specified size and relocation
+ /// information, return a section that it should be placed in.
+ const MCSection *getSectionForConstant(SectionKind Kind,
+ const Constant *C) const override;
};
} // end namespace llvm
OpenPOWER on IntegriCloud