Skip to content

Commit 95381f8

Browse files
arsenmmiguelcsx
authored andcommitted
AsmPrinter: Do not use report_fatal_error for AIX XXStructor error (llvm#145273)
1 parent df722f5 commit 95381f8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3243,9 +3243,11 @@ void AsmPrinter::preprocessXXStructorList(const DataLayout &DL,
32433243
S.Priority = Priority->getLimitedValue(65535);
32443244
S.Func = CS->getOperand(1);
32453245
if (!CS->getOperand(2)->isNullValue()) {
3246-
if (TM.getTargetTriple().isOSAIX())
3247-
llvm::report_fatal_error(
3246+
if (TM.getTargetTriple().isOSAIX()) {
3247+
CS->getContext().emitError(
32483248
"associated data of XXStructor list is not yet supported on AIX");
3249+
}
3250+
32493251
S.ComdatKey =
32503252
dyn_cast<GlobalValue>(CS->getOperand(2)->stripPointerCasts());
32513253
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: not --crash llc -mtriple powerpc-ibm-aix-xcoff < %s 2>&1 | FileCheck %s
2-
; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck %s
1+
; RUN: not llc -mtriple powerpc-ibm-aix-xcoff < %s 2>&1 | FileCheck %s
2+
; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck %s
33

44
@v = global i8 0
55

@@ -9,4 +9,4 @@ define void @foo() {
99
ret void
1010
}
1111

12-
; CHECK: LLVM ERROR: associated data of XXStructor list is not yet supported on AIX
12+
; CHECK: error: associated data of XXStructor list is not yet supported on AIX

0 commit comments

Comments
 (0)