Skip to content

Commit 809e290

Browse files
authored
X86: Use reportFatalUsageError for tiny code model error (#145279)
1 parent ffc7d5a commit 809e290

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Target/X86/X86TargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ getEffectiveX86CodeModel(const Triple &TT, std::optional<CodeModel::Model> CM,
219219
bool Is64Bit = TT.getArch() == Triple::x86_64;
220220
if (CM) {
221221
if (*CM == CodeModel::Tiny)
222-
report_fatal_error("Target does not support the tiny CodeModel", false);
222+
reportFatalUsageError("target does not support the tiny CodeModel");
223223
return *CM;
224224
}
225225
if (JIT)

llvm/test/CodeGen/X86/codemodel.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
66
target triple = "x86_64-unknown-linux-gnu"
77
@data = external dso_local global [0 x i32] ; <ptr> [#uses=5]
88

9-
; CHECK-TINY: Target does not support the tiny CodeModel
9+
; CHECK-TINY: LLVM ERROR: target does not support the tiny CodeModel
1010

1111
define i32 @foo() nounwind readonly {
1212
entry:

0 commit comments

Comments
 (0)