Skip to content

Commit 7cb66ff

Browse files
committed
[PowerPC] Use reportError
Report a proper error and fix de1dc9c
1 parent 8fa5b6c commit 7cb66ff

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,8 @@ unsigned PPCELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target,
145145
break;
146146
case PPC::fixup_ppc_half16ds:
147147
case PPC::fixup_ppc_half16dq:
148-
Target.print(errs());
149-
errs() << '\n';
150-
report_fatal_error("Invalid PC-relative half16ds relocation");
148+
Ctx.reportError(Loc, "unsupported relocation type");
149+
break;
151150
case PPC::fixup_ppc_pcrel34:
152151
switch (Spec) {
153152
default:

llvm/test/MC/PowerPC/pr24686.s

Lines changed: 0 additions & 7 deletions
This file was deleted.

llvm/test/MC/PowerPC/relocation-specifier-err.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ addi 3, 3, foo@plt
1010
# CHECK: [[#@LINE+1]]:14: error: unsupported relocation type
1111
paddi 3, 13, foo@toc, 0
1212

13+
# CHECK: [[#@LINE+1]]:15: error: unsupported relocation type
14+
ld %r5, p_end - .(%r5)
15+
1316
# CHECK: [[#@LINE+1]]:7: error: unsupported relocation type
1417
.quad foo@toc

0 commit comments

Comments
 (0)