summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2018-04-10 17:53:41 +0000
committerJessica Paquette <jpaquette@apple.com>2018-04-10 17:53:41 +0000
commitc140bbddafeb990bc437620ecb6ab5bac35d2a87 (patch)
treed5cf8d757f739326f31f5b49878a376549bf5b4b
parent7a048da40c4a7c120cc7d7126ec625738bebad33 (diff)
downloadbcm5719-llvm-c140bbddafeb990bc437620ecb6ab5bac35d2a87.tar.gz
bcm5719-llvm-c140bbddafeb990bc437620ecb6ab5bac35d2a87.zip
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. llvm-svn: 329728
-rw-r--r--llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp3
-rw-r--r--llvm/test/MC/AArch64/arm64-no-section.ll10
2 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
index a8e0d0563c7..d52c58e47f9 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
+++ b/llvm/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/llvm/test/MC/AArch64/arm64-no-section.ll b/llvm/test/MC/AArch64/arm64-no-section.ll
deleted file mode 100644
index 60e1e282b16..00000000000
--- a/llvm/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: <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
-}
OpenPOWER on IntegriCloud