From 9f1a234a23c810791aa78c8005d39cebf5c09936 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Sun, 21 Feb 2016 01:40:04 +0000 Subject: [PATCH] Unbreak non-X86 targets from fallout caused by r261462 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261463 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/MipsTargetObjectFile.cpp | 8 +++++--- lib/Target/Mips/MipsTargetObjectFile.h | 3 ++- lib/Target/NVPTX/NVPTXTargetObjectFile.h | 3 ++- lib/Target/XCore/XCoreTargetObjectFile.cpp | 6 ++++-- lib/Target/XCore/XCoreTargetObjectFile.h | 3 ++- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/Target/Mips/MipsTargetObjectFile.cpp b/lib/Target/Mips/MipsTargetObjectFile.cpp index e83abdd2a8c..3bd4567e379 100644 --- a/lib/Target/Mips/MipsTargetObjectFile.cpp +++ b/lib/Target/Mips/MipsTargetObjectFile.cpp @@ -140,11 +140,13 @@ bool MipsTargetObjectFile::IsConstantInSmallSection( } /// Return true if this constant should be placed into small data section. -MCSection *MipsTargetObjectFile::getSectionForConstant( - const DataLayout &DL, SectionKind Kind, const Constant *C) const { +MCSection *MipsTargetObjectFile::getSectionForConstant(const DataLayout &DL, + SectionKind Kind, + const Constant *C, + unsigned &Align) const { if (IsConstantInSmallSection(DL, C, *TM)) return SmallDataSection; // Otherwise, we work the same as ELF. - return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C); + return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Align); } diff --git a/lib/Target/Mips/MipsTargetObjectFile.h b/lib/Target/Mips/MipsTargetObjectFile.h index ba04343bad8..9840769aff6 100644 --- a/lib/Target/Mips/MipsTargetObjectFile.h +++ b/lib/Target/Mips/MipsTargetObjectFile.h @@ -40,7 +40,8 @@ class MipsTargetMachine; const TargetMachine &TM) const; MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, - const Constant *C) const override; + const Constant *C, + unsigned &Align) const override; }; } // end namespace llvm diff --git a/lib/Target/NVPTX/NVPTXTargetObjectFile.h b/lib/Target/NVPTX/NVPTXTargetObjectFile.h index 683b9a3f49f..53b89f3284b 100644 --- a/lib/Target/NVPTX/NVPTXTargetObjectFile.h +++ b/lib/Target/NVPTX/NVPTXTargetObjectFile.h @@ -87,7 +87,8 @@ public: } MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, - const Constant *C) const override { + const Constant *C, + unsigned &Align) const override { return ReadOnlySection; } diff --git a/lib/Target/XCore/XCoreTargetObjectFile.cpp b/lib/Target/XCore/XCoreTargetObjectFile.cpp index 4a77d82b9ac..abe1deddc56 100644 --- a/lib/Target/XCore/XCoreTargetObjectFile.cpp +++ b/lib/Target/XCore/XCoreTargetObjectFile.cpp @@ -145,8 +145,10 @@ XCoreTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV, report_fatal_error("Target does not support TLS or Common sections"); } -MCSection *XCoreTargetObjectFile::getSectionForConstant( - const DataLayout &DL, SectionKind Kind, const Constant *C) const { +MCSection *XCoreTargetObjectFile::getSectionForConstant(const DataLayout &DL, + SectionKind Kind, + const Constant *C, + unsigned &Align) const { if (Kind.isMergeableConst4()) return MergeableConst4Section; if (Kind.isMergeableConst8()) return MergeableConst8Section; if (Kind.isMergeableConst16()) return MergeableConst16Section; diff --git a/lib/Target/XCore/XCoreTargetObjectFile.h b/lib/Target/XCore/XCoreTargetObjectFile.h index 6701c661a73..c129d757dea 100644 --- a/lib/Target/XCore/XCoreTargetObjectFile.h +++ b/lib/Target/XCore/XCoreTargetObjectFile.h @@ -34,7 +34,8 @@ static const unsigned CodeModelLargeSize = 256; const TargetMachine &TM) const override; MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, - const Constant *C) const override; + const Constant *C, + unsigned &Align) const override; }; } // end namespace llvm