================
@@ -0,0 +1,26 @@
+//==--- DiagnosticCodeGenKinds.td - CodeGen Diagnostics 
-------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+//===----------------------------------------------------------------------===//
+// Trap Diagnostics
+//
+// These are diagnostics that are emitted into Debug Info, rather than to the
+// traditional consumers like the terminal. Their primary purpose is to make
+// debugging traps (e.g. `-fsanitize-trap=undefined`) easier by attaching
+// a trap category and reason to the trap instruction that tools like a 
debugger
+// can show.
+//===----------------------------------------------------------------------===//
+let Component = "CodeGen" in {
+let CategoryName = "Undefined Behavior Sanitizer" in {
+
+def trap_ubsan_arith_overflow : Trap<
+  "%select{unsigned|signed}0 integer "
+  "%select{addition|subtraction|multiplication}1 overflow in %2">;
----------------
Sirraide wrote:

Can we use `%enum_select` for these?

https://github.com/llvm/llvm-project/pull/154618
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to