Skip to content

Commit b7db119

Browse files
committed
[MC,ARM] Change a report_fatal_error to reportError
Similar to other "unsupported relocation type" diagnostics, we don't report the internal fixup name.
1 parent 9f75270 commit b7db119

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ unsigned ARMWinCOFFObjectWriter::getRelocType(MCContext &Ctx,
6161

6262
switch (FixupKind) {
6363
default: {
64-
const MCFixupKindInfo &Info = MAB.getFixupKindInfo(Fixup.getKind());
65-
report_fatal_error(Twine("unsupported relocation type: ") + Info.Name);
64+
Ctx.reportError(Fixup.getLoc(), "unsupported relocation type");
65+
return COFF::IMAGE_REL_ARM_ABSOLUTE;
6666
}
6767
case FK_Data_4:
6868
switch (Modifier) {
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not --crash llvm-mc -triple thumbv7-windows -incremental-linker-compatible -filetype obj -o /dev/null 2>&1 %s \
1+
# RUN: not llvm-mc -triple thumbv7-windows -incremental-linker-compatible -filetype obj -o /dev/null 2>&1 %s \
22
# RUN: | FileCheck %s
33

44
.def invalid_relocation
@@ -9,5 +9,4 @@
99
.thumb_func
1010
adr r0, invalid_relocation+1
1111

12-
# CHECK: LLVM ERROR: unsupported relocation type: fixup_t2_adr_pcrel_12
13-
12+
# CHECK: 10:2: error: unsupported relocation type

0 commit comments

Comments
 (0)