diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-14 22:06:29 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-14 22:06:29 +0000 |
commit | 5a1c4b82830214504c9e8c4a7bc0492478035605 (patch) | |
tree | 600e1b90716be41fa2aae43570f5f03e40468fff /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | eb9e5f41a641b8ca1d222adb27a1c16c622ace3a (diff) | |
download | bcm5719-llvm-5a1c4b82830214504c9e8c4a7bc0492478035605.tar.gz bcm5719-llvm-5a1c4b82830214504c9e8c4a7bc0492478035605.zip |
CodeGen: Add a getSectionKind method to MachineConstantPoolEntry
This is just a helper routine, no functionality has changed.
llvm-svn: 212993
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index f80fdeac3c8..4c3e6aa4732 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1062,21 +1062,7 @@ void AsmPrinter::EmitConstantPool() { const MachineConstantPoolEntry &CPE = CP[i]; unsigned Align = CPE.getAlignment(); - SectionKind Kind; - switch (CPE.getRelocationInfo()) { - default: llvm_unreachable("Unknown section kind"); - case 2: Kind = SectionKind::getReadOnlyWithRel(); break; - case 1: - Kind = SectionKind::getReadOnlyWithRelLocal(); - break; - case 0: - switch (TM.getDataLayout()->getTypeAllocSize(CPE.getType())) { - case 4: Kind = SectionKind::getMergeableConst4(); break; - case 8: Kind = SectionKind::getMergeableConst8(); break; - case 16: Kind = SectionKind::getMergeableConst16();break; - default: Kind = SectionKind::getMergeableConst(); break; - } - } + SectionKind Kind = CPE.getSectionKind(TM.getDataLayout()); const MCSection *S = getObjFileLowering().getSectionForConstant(Kind); |