[llvm] Add CodeView S_LABEL32 symbols for jump table targets (for Windows debugging) (PR #146121)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 21:29:59 PDT 2025
================
@@ -3566,15 +3566,38 @@ void CodeViewDebug::collectDebugInfoForJumpTables(const MachineFunction *MF,
break;
}
- CurFn->JumpTables.push_back(
- {EntrySize, Base, BaseOffset, Branch,
- MF->getJTISymbol(JumpTableIndex, MMI->getContext()),
- JTI.getJumpTables()[JumpTableIndex].MBBs.size()});
+ const MachineJumpTableEntry &JTE = JTI.getJumpTables()[JumpTableIndex];
+
+ JumpTableInfo CVJTI{EntrySize,
+ Base,
+ BaseOffset,
+ Branch,
+ MF->getJTISymbol(JumpTableIndex, MMI->getContext()),
+ JTE.MBBs.size()};
+
+ for (const auto &MBB : JTE.MBBs) {
+ CVJTI.Cases.push_back(MBB->getSymbol());
----------------
MaskRay wrote:
omit braces for singe-line simple body https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
https://github.com/llvm/llvm-project/pull/146121
More information about the llvm-commits
mailing list