[compiler-rt] [llvm] [LowerTypeTests] Add debug info to jump table entries (PR #194493)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 17:03:26 PDT 2026


================
@@ -855,6 +855,28 @@ void __ubsan::__ubsan_handle_pointer_overflow_abort(PointerOverflowData *Data,
   Die();
 }
 
+// Returns true if this is a special location created by
+// `LowerTypeTestsModule::createJumpTable`.
+static bool isArtificialStack(const SymbolizedStack *S) {
+  static constexpr char kSuffix[] = "ubsan_interface.h";
+  if (!S || !S->info.function || !S->info.file)
+    return false;
+  const char *File = S->info.file;
+  File += internal_strlen(File) - internal_strlen(kSuffix);
+  return internal_strcmp(File, kSuffix) == 0;
----------------
vitalybuka wrote:

I'd rather keep str for consistency.
Few cycles saved in memcmp here are irrelevant.

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


More information about the llvm-commits mailing list