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

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 20 17:40:05 PST 2016


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
 




More information about the llvm-commits mailing list