[llvm] [Bitstream] Use reportFatalInternalError for invalid encoding (PR #203653)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 16:46:43 PDT 2026


https://github.com/sladyn98 created https://github.com/llvm/llvm-project/pull/203653

Migrate one report_fatal_error call site to the non-deprecated internal-error API. The fallthrough in BitCodeAbbrevOp::hasEncodingData is only reachable for an invalid Encoding value, so it represents an internal invariant failure rather than a usage error.

Part of #138914.

>From a30440e1067019e6359dc6735b5c44c27a7ad01a Mon Sep 17 00:00:00 2001
From: Sladyn Nunes <sladyn at meta.com>
Date: Fri, 12 Jun 2026 16:35:36 -0700
Subject: [PATCH] [Bitstream] Use reportFatalInternalError for invalid encoding

Migrate one report_fatal_error call site to the non-deprecated internal-error API. The fallthrough in BitCodeAbbrevOp::hasEncodingData is only reachable for an invalid Encoding value, so it represents an internal invariant failure rather than a usage error.

Part of #138914.
---
 llvm/include/llvm/Bitstream/BitCodes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/Bitstream/BitCodes.h b/llvm/include/llvm/Bitstream/BitCodes.h
index 205024f754dfb..26d9be7dec267 100644
--- a/llvm/include/llvm/Bitstream/BitCodes.h
+++ b/llvm/include/llvm/Bitstream/BitCodes.h
@@ -81,7 +81,7 @@ class BitCodeAbbrevOp {
     case Blob:
       return false;
     }
-    report_fatal_error("Invalid encoding");
+    reportFatalInternalError("Invalid encoding");
   }
 
   /// isChar6 - Return true if this character is legal in the Char6 encoding.



More information about the llvm-commits mailing list