[llvm] [llvm-pdbutil] Dump and parse unknown records (PR #180761)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 11 11:54:40 PST 2026


================
@@ -688,15 +728,15 @@ static inline Expected<LeafRecord> fromCodeViewRecordImpl(CVType Type) {
 Expected<LeafRecord> LeafRecord::fromCodeViewRecord(CVType Type) {
 #define TYPE_RECORD(EnumName, EnumVal, ClassName)                              \
   case EnumName:                                                               \
-    return fromCodeViewRecordImpl<ClassName##Record>(Type);
+    return fromCodeViewRecordImpl<LeafRecordImpl<ClassName##Record>>(Type);
 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)             \
   TYPE_RECORD(EnumName, EnumVal, ClassName)
 #define MEMBER_RECORD(EnumName, EnumVal, ClassName)
 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)
   switch (Type.kind()) {
 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
   default:
-      llvm_unreachable("Unknown leaf kind!");
+    return fromCodeViewRecordImpl<UnknownLeafRecord>(Type);
   }
   return make_error<CodeViewError>(cv_error_code::corrupt_record);
----------------
aganea wrote:

This line is unreachable, could be removed.

https://github.com/llvm/llvm-project/pull/180761


More information about the llvm-commits mailing list