[llvm] r261463 - Unbreak non-X86 targets from fallout caused by r261462

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 09:28:14 PST 2016


Could we have this and it's dependent r261462 merged in to 3.8?

On Sat, Feb 20, 2016 at 5:40 PM, David Majnemer via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: majnemer
> Date: Sat Feb 20 19:40:04 2016
> New Revision: 261463
>
> URL: http://llvm.org/viewvc/llvm-project?rev=261463&view=rev
> Log:
> Unbreak non-X86 targets from fallout caused by r261462
>
> Modified:
>     llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp
>     llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h
>     llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h
>     llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp
>     llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h
>
> Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp?rev=261463&r1=261462&r2=261463&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp (original)
> +++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp Sat Feb 20
> 19:40:04 2016
> @@ -140,11 +140,13 @@ bool MipsTargetObjectFile::IsConstantInS
>  }
>
>  /// 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);
>  }
>
> Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h?rev=261463&r1=261462&r2=261463&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h (original)
> +++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h Sat Feb 20 19:40:04
> 2016
> @@ -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
>
>
> Modified: llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h?rev=261463&r1=261462&r2=261463&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h (original)
> +++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h Sat Feb 20
> 19:40:04 2016
> @@ -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;
>    }
>
>
> Modified: llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp?rev=261463&r1=261462&r2=261463&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp Sat Feb 20
> 19:40:04 2016
> @@ -145,8 +145,10 @@ XCoreTargetObjectFile::SelectSectionForG
>    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;
>
> Modified: llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h?rev=261463&r1=261462&r2=261463&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h Sat Feb 20
> 19:40:04 2016
> @@ -34,7 +34,8 @@ static const unsigned CodeModelLargeSize
>                                        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
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160222/d5ace73d/attachment.html>


More information about the llvm-commits mailing list