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
This commit is contained in:
Jessica Paquette 2018-04-10 17:53:41 +00:00
parent 272dbbe783
commit 538b65888c
2 changed files with 1 additions and 12 deletions

View File

@ -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();

View File

@ -1,10 +0,0 @@
; RUN: not llc -mtriple=aarch64-darwin-- -filetype=obj %s -o /dev/null
; CHECK: <inline asm>: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
}