amccarth added a comment.

Is `.eh_frame` the only one that matters?  Should this be more general and 
compare `const_sect_name` to the full name and the truncated name for any known 
section names?

If the giant cascade of else-if were factored into a separate function, then a 
trivial unit test could verify that it returns the right section_type for a 
variety of full and truncated names (as well as other combinations of section 
headers).

Although not directly relevant to this patch, it seems like a lot this cascade 
could be made more readable and maintainable by replacing the simple 
if-name-set-section_type cases were replaced with a lookup into a table (and 
that lookup could be the one place to check both the full name and the 
truncated name).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70745/new/

https://reviews.llvm.org/D70745



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to