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

GitOrigin-RevId: 809e2900fff9d2d26e01412e1b9b3eaa3e752161
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 2d4afc2..5770f3e 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -219,7 +219,7 @@
   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/test/CodeGen/X86/codemodel.ll b/test/CodeGen/X86/codemodel.ll
index d5aff5f..b56d68d 100644
--- a/test/CodeGen/X86/codemodel.ll
+++ b/test/CodeGen/X86/codemodel.ll
@@ -6,7 +6,7 @@
 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: