summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-02-12 17:16:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-02-12 17:16:46 +0000
commit29786d4c161e6fd458fb2f1abc58a9f3401ee7f7 (patch)
treed0f2822cd564783aabfca22128a79dc1227c735c /llvm/lib/Target/TargetLoweringObjectFile.cpp
parent40957cc2ce05a4355cf9f267b9d7930eee1a5093 (diff)
downloadbcm5719-llvm-29786d4c161e6fd458fb2f1abc58a9f3401ee7f7.tar.gz
bcm5719-llvm-29786d4c161e6fd458fb2f1abc58a9f3401ee7f7.zip
Put each jump table in an independent section if the function is too.
This allows the linker to GC both, fixing pr22557. llvm-svn: 228937
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 25b898c1aee..c098035a5aa 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -270,6 +270,11 @@ SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
return SelectSectionForGlobal(GV, Kind, Mang, TM);
}
+const MCSection *TargetLoweringObjectFile::getSectionForJumpTable(
+ const Function &F, Mangler &Mang, const TargetMachine &TM) const {
+ return getSectionForConstant(SectionKind::getReadOnly(), /*C=*/nullptr);
+}
+
/// getSectionForConstant - Given a mergable constant with the
/// specified size and relocation information, return a section that it
/// should be placed in.
OpenPOWER on IntegriCloud