[llvm] X86: Use reportFatalUsageError for tiny code model error (PR #145279)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 22 23:29:03 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/145279.diff
2 Files Affected:
- (modified) llvm/lib/Target/X86/X86TargetMachine.cpp (+1-1)
- (modified) llvm/test/CodeGen/X86/codemodel.ll (+1-1)
``````````diff
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:
``````````
</details>
https://github.com/llvm/llvm-project/pull/145279
More information about the llvm-commits
mailing list