[llvm] X86: Use reportFatalUsageError for tiny code model error (PR #145279)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 22 23:28:24 PDT 2025
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/145279
None
>From 9b61ec2236a3d9ccb7ef6d42ee02476730749d97 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Mon, 23 Jun 2025 15:27:20 +0900
Subject: [PATCH] X86: Use reportFatalUsageError for tiny code model error
---
llvm/lib/Target/X86/X86TargetMachine.cpp | 2 +-
llvm/test/CodeGen/X86/codemodel.ll | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 2d4afc23f1a42..5770f3e39c40e 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -219,7 +219,7 @@ getEffectiveX86CodeModel(const Triple &TT, std::optional<CodeModel::Model> CM,
bool Is64Bit = TT.getArch() == Triple::x86_64;
if (CM) {
if (*CM == CodeModel::Tiny)
- report_fatal_error("Target does not support the tiny CodeModel", false);
+ reportFatalUsageError("target does not support the tiny CodeModel");
return *CM;
}
if (JIT)
diff --git a/llvm/test/CodeGen/X86/codemodel.ll b/llvm/test/CodeGen/X86/codemodel.ll
index d5aff5fac7bce..b56d68d5e6bfb 100644
--- a/llvm/test/CodeGen/X86/codemodel.ll
+++ b/llvm/test/CodeGen/X86/codemodel.ll
@@ -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
target triple = "x86_64-unknown-linux-gnu"
@data = external dso_local global [0 x i32] ; <ptr> [#uses=5]
-; CHECK-TINY: Target does not support the tiny CodeModel
+; CHECK-TINY: LLVM ERROR: target does not support the tiny CodeModel
define i32 @foo() nounwind readonly {
entry:
More information about the llvm-commits
mailing list