[llvm] Don't crash in dwarf::isC() on vendor-defined languages (PR #223739)
Laxman Sole via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 09:49:33 PDT 2026
================
@@ -825,6 +825,11 @@ inline bool isC(SourceLanguage S) {
case DW_LANG_Gleam:
return false;
}
+ // The switch above covers the DW_LANG_{lo,hi}_user boundaries, but every
+ // vendor-defined code in between is a valid SourceLanguage that no case
+ // enumerates. None of them is C.
+ if (S > DW_LANG_lo_user && S < DW_LANG_hi_user)
----------------
laxmansole wrote:
Can we add the missing cases instead? The assertion below will catch the truly unknown/undefined language.
https://github.com/llvm/llvm-project/pull/223739
More information about the llvm-commits
mailing list