mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
remove a use of SectionFlagsForGlobal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76970 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -382,16 +382,17 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI,
|
|||||||
|
|
||||||
const char* JumpTableDataSection = TAI->getJumpTableDataSection();
|
const char* JumpTableDataSection = TAI->getJumpTableDataSection();
|
||||||
const Function *F = MF.getFunction();
|
const Function *F = MF.getFunction();
|
||||||
unsigned SectionFlags = TAI->SectionFlagsForGlobal(F);
|
const Section *FuncSection = TAI->SectionForGlobal(F);
|
||||||
|
|
||||||
bool JTInDiffSection = false;
|
bool JTInDiffSection = false;
|
||||||
if ((IsPic && !(LoweringInfo && LoweringInfo->usesGlobalOffsetTable())) ||
|
if ((IsPic && !(LoweringInfo && LoweringInfo->usesGlobalOffsetTable())) ||
|
||||||
!JumpTableDataSection ||
|
!JumpTableDataSection ||
|
||||||
SectionFlags & SectionFlags::Linkonce) {
|
FuncSection->hasFlag(SectionFlags::Linkonce)) {
|
||||||
// In PIC mode, we need to emit the jump table to the same section as the
|
// In PIC mode, we need to emit the jump table to the same section as the
|
||||||
// function body itself, otherwise the label differences won't make sense.
|
// function body itself, otherwise the label differences won't make sense.
|
||||||
// We should also do if the section name is NULL or function is declared in
|
// We should also do if the section name is NULL or function is declared in
|
||||||
// discardable section.
|
// discardable section.
|
||||||
SwitchToSection(TAI->SectionForGlobal(F));
|
SwitchToSection(FuncSection);
|
||||||
} else {
|
} else {
|
||||||
SwitchToDataSection(JumpTableDataSection);
|
SwitchToDataSection(JumpTableDataSection);
|
||||||
JTInDiffSection = true;
|
JTInDiffSection = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user