aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorAlex Langford <alangford@apple.com>2024-05-03 11:05:11 -0700
committerGitHub <noreply@github.com>2024-05-03 11:05:11 -0700
commite2b3e4ea9f2d0cb34d197439cfbc5090cdacb124 (patch)
tree4688345bbc1b710c059f777e1d5e0c3293814fcf /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent401ecb4ccc2a319e55155b6a8558aa3478e5405e (diff)
downloadllvm-e2b3e4ea9f2d0cb34d197439cfbc5090cdacb124.zip
llvm-e2b3e4ea9f2d0cb34d197439cfbc5090cdacb124.tar.gz
llvm-e2b3e4ea9f2d0cb34d197439cfbc5090cdacb124.tar.bz2
[lldb][NFCI] Unify DW_TAG -> string conversions (#90657)
The high level goal is to have 1 way of converting a DW_TAG value into a human-readable string. There are 3 ways this change accomplishes that: 1.) Changing DW_TAG_value_to_name to not create custom error strings. The way it was doing this is error-prone: Specifically, it was using a function-local static char buffer and handing out a pointer to it. Initialization of this is thread-safe, but mutating it is definitely not. Multiple threads that want to call this function could step on each others toes. The implementation in this patch sidesteps the issue by just returning a StringRef with no mention of the tag value in it. 2.) Changing all uses of DW_TAG_value_to_name to log the value of the tag since the function doesn't create a string with the value in it anymore. 3.) Removing `DWARFBaseDIE::GetTagAsCString()`. Callers should call DW_TAG_value_to_name on the tag directly.
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions