diff options
Diffstat (limited to 'lib/Target/ELFTargetAsmInfo.cpp')
-rw-r--r-- | lib/Target/ELFTargetAsmInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 8ace00abd9..5deabee0ba 100644 --- a/lib/Target/ELFTargetAsmInfo.cpp +++ b/lib/Target/ELFTargetAsmInfo.cpp @@ -61,10 +61,8 @@ ELFTargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const { // By default - all relocations in PIC mode would force symbol to be // placed in r/w section. - unsigned Reloc = (TM.getRelocationModel() != Reloc::Static ? - Reloc::LocalOrGlobal : Reloc::None); - - if (Reloc != Reloc::None && C->ContainsRelocations(Reloc)) + if (TM.getRelocationModel() != Reloc::Static && + C->ContainsRelocations(Reloc::LocalOrGlobal)) return (C->ContainsRelocations(Reloc::Global) ? (isConstant ? SectionKind::DataRelRO : SectionKind::DataRel) : |