diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index a2823500fa6..e93299fccb2 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -852,6 +852,8 @@ MachineConstantPoolEntry::getSectionKind(const DataLayout *DL) const { return SectionKind::getMergeableConst8(); case 16: return SectionKind::getMergeableConst16(); + case 32: + return SectionKind::getMergeableConst32(); default: return SectionKind::getReadOnly(); } diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 624eaec73b4..4229741cf5a 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -270,9 +270,11 @@ selectELFSectionForGlobal(MCContext &Ctx, const GlobalValue *GV, EntrySize = 4; } else if (Kind.isMergeableConst8()) { EntrySize = 8; - } else { - assert(Kind.isMergeableConst16() && "unknown data width"); + } else if (Kind.isMergeableConst16()) { EntrySize = 16; + } else { + assert(Kind.isMergeableConst32() && "unknown data width"); + EntrySize = 32; } } @@ -375,6 +377,8 @@ MCSection *TargetLoweringObjectFileELF::getSectionForConstant( return MergeableConst8Section; if (Kind.isMergeableConst16() && MergeableConst16Section) return MergeableConst16Section; + if (Kind.isMergeableConst32() && MergeableConst32Section) + return MergeableConst32Section; if (Kind.isReadOnly()) return ReadOnlySection; |

