[compiler-rt] [llvm] [LowerTypeTests] Add debug info to jump table entries (PR #194493)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 28 16:57:33 PDT 2026
================
@@ -1523,25 +1524,87 @@ Triple::ArchType LowerTypeTestsModule::selectJumpTableArmEncoding(
return ArmCount > ThumbCount ? Triple::arm : Triple::thumb;
}
+// Create location for each function entry which should look like this:
+// frame #0: c::c() (.cfi_jt) at sanitizer/ubsan_interface.h:0:0
+// frame #1: __ubsan_check_cfi_icall_jt at sanitizer/ubsan_interface.h:0
+// frame #2: .cfi.jumptable.81 at sanitizer/ubsan_interface.h:0:0
+static SmallVector<DILocation *>
+createJumpTableDebugInfo(Function *F, ArrayRef<GlobalTypeMember *> Functions) {
+ Module &M = *F->getParent();
+ DICompileUnit *CU = nullptr;
+ auto CUs = M.debug_compile_units();
+ if (!CUs.empty())
+ CU = *CUs.begin();
----------------
fmayer wrote:
does this have `.front()`?
https://github.com/llvm/llvm-project/pull/194493
More information about the llvm-commits
mailing list