Unbreak non-X86 targets from fallout caused by r261462
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 21 Feb 2016 01:40:04 +0000 (01:40 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 21 Feb 2016 01:40:04 +0000 (01:40 +0000)
llvm-svn: 261463

llvm/lib/Target/Mips/MipsTargetObjectFile.cpp
llvm/lib/Target/Mips/MipsTargetObjectFile.h
llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h
llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
llvm/lib/Target/XCore/XCoreTargetObjectFile.h

index e83abdd2a8c872f4ee0c06dcc70f30049edbadb7..3bd4567e379224b82dafb7bdcb0dae12d8ff2013 100644 (file)
@@ -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);
 }
index ba04343bad87a595d2491386702b380e6f1188c8..9840769aff695c60d710ae8d762cde30b6d4c9e4 100644 (file)
@@ -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
 
index 683b9a3f49f7b42401c8be7b1a4220bd691a1c6f..53b89f3284bb83dc7807228679f6b2462c4078e8 100644 (file)
@@ -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;
   }
 
index 4a77d82b9acd4335ec3c89443c324b4adc09f67f..abe1deddc56e8d463c917ec0fb6c8328c044c6af 100644 (file)
@@ -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;
index 6701c661a73eba3e69f45595dd30976fd2281e30..c129d757dea315ede70027e69e758b3c59bc2f57 100644 (file)
@@ -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