[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 13:20:44 PDT 2024


================
@@ -64,6 +65,20 @@ static llvm::cl::opt<bool> ClSanitizeGuardChecks(
     "ubsan-guard-checks", llvm::cl::Optional,
     llvm::cl::desc("Guard UBSAN checks with `llvm.allow.ubsan.check()`."));
 
+//===--------------------------------------------------------------------===//
+//                        Defines for metadata
+//===--------------------------------------------------------------------===//
+enum VariableTypeDescriptorKind : uint16_t {
+  /// An integer type.
+  TK_Integer = 0x0000,
+  /// A floating-point type.
+  TK_Float = 0x0001,
+  /// An _BitInt(N) type.
+  TK_BitInt = 0x0002,
+  /// Any other type. The value representation is unspecified.
+  TK_Unknown = 0xffff
+};
----------------
earnol wrote:

Yes. It is in line with UBSan runtime and it should be in line with it to work. Accepted. Will make it more clear.

https://github.com/llvm/llvm-project/pull/93612


More information about the llvm-commits mailing list