[llvm] 809e290 - X86: Use reportFatalUsageError for tiny code model error (#145279)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 21:52:35 PDT 2025


Author: Matt Arsenault
Date: 2025-06-24T13:52:30+09:00
New Revision: 809e2900fff9d2d26e01412e1b9b3eaa3e752161

URL: https://github.com/llvm/llvm-project/commit/809e2900fff9d2d26e01412e1b9b3eaa3e752161
DIFF: https://github.com/llvm/llvm-project/commit/809e2900fff9d2d26e01412e1b9b3eaa3e752161.diff

LOG: X86: Use reportFatalUsageError for tiny code model error (#145279)

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86TargetMachine.cpp
    llvm/test/CodeGen/X86/codemodel.ll

Removed: 
    


################################################################################
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