From 538b65888c793f9c84103865ddc19cff2fc57f87 Mon Sep 17 00:00:00 2001 From: Jessica Paquette Date: Tue, 10 Apr 2018 17:53:41 +0000 Subject: [PATCH] Revert 329716 "Add missing nullptr check before getSection() to AArch64MachObjectWriter::recordRelocation" This broke a bunch of bots so I'm reverting while I figure it out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329728 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp | 3 +-- test/MC/AArch64/arm64-no-section.ll | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 test/MC/AArch64/arm64-no-section.ll diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp b/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp index a8e0d0563c7..d52c58e47f9 100644 --- a/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp +++ b/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp @@ -305,8 +305,7 @@ void AArch64MachObjectWriter::recordRelocation( bool CanUseLocalRelocation = canUseLocalRelocation(Section, *Symbol, Log2Size); - if (Symbol->isTemporary() && Symbol->isInSection() && - (Value || !CanUseLocalRelocation)) { + if (Symbol->isTemporary() && (Value || !CanUseLocalRelocation)) { const MCSection &Sec = Symbol->getSection(); if (!Asm.getContext().getAsmInfo()->isSectionAtomizableBySymbols(Sec)) Symbol->setUsedInReloc(); diff --git a/test/MC/AArch64/arm64-no-section.ll b/test/MC/AArch64/arm64-no-section.ll deleted file mode 100644 index 60e1e282b16..00000000000 --- a/test/MC/AArch64/arm64-no-section.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: not llc -mtriple=aarch64-darwin-- -filetype=obj %s -o /dev/null -; CHECK: :1:2: error: unsupported relocation of local symbol -; CHECK-SAME: 'L_foo_end'. Must have non-local symbol earlier in section. - -; Make sure that we emit an error when we try to reference something that -; doesn't belong to a section. -define void @foo() local_unnamed_addr { - call void asm sideeffect "b L_foo_end\0A", ""() - ret void -}