llvm / llvm/llvm-project

Evaluate helper function / custom adapter to format hex with dynamic length

Open
#192,406 1 comment 0 reactions 0 assignees View on GitHub
debuginfo
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

This pattern is used frequently, maybe it makes sense to extract this into a helper function / add a custom adapter (local to DebugInfo/DWARF?)? This would avoid confusion with `0x{0:x-}`.
Maybe it could support omitting `0x` to adopt wider use.

_Originally posted by @s-barannikov in https://github.com/llvm/llvm-project/pull/191988#discussion_r3078217470_

Contributor guide

Open the contributing guide

Research direction

The issue points to DebugInfo/DWARF but names no file, entry point, or test. Search that area for repeated dynamic hex-formatting patterns and the `0x{0:x-}` usage, then compare the helper and custom-adapter approaches, including whether omitting `0x` should be supported; done means agreeing on a scoped design and its validation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.