Skip to content

Commit 75ff556

Browse files
arsenmmiguelcsx
authored andcommitted
AsmPrinter: Do not use report_fatal_error for unknown appending linkage (llvm#145269)
1 parent 2e4965c commit 75ff556

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3207,7 +3207,10 @@ bool AsmPrinter::emitSpecialLLVMGlobal(const GlobalVariable *GV) {
32073207
return true;
32083208
}
32093209

3210-
report_fatal_error("unknown special variable with appending linkage");
3210+
GV->getContext().emitError(
3211+
"unknown special variable with appending linkage: " +
3212+
GV->getNameOrAsOperand());
3213+
return true;
32113214
}
32123215

32133216
/// EmitLLVMUsedList - For targets that define a MAI::UsedDirective, mark each
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
; RUN: not --crash llc < %s -mtriple=i686-- 2>&1 | FileCheck %s
1+
; RUN: not llc < %s -mtriple=i686-- 2>&1 | FileCheck %s
22

3-
; CHECK: unknown special variable with appending linkage
4-
@foo = appending constant [1 x i32 ]zeroinitializer
3+
; CHECK: error: unknown special variable with appending linkage: foo
4+
@foo = appending constant [1 x i32 ] zeroinitializer
5+
6+
; CHECK: error: unknown special variable with appending linkage: @0
7+
@0 = appending constant [1 x i32 ] zeroinitializer

0 commit comments

Comments
 (0)