[clang] [llvm] [DebugInfo] Emit DW_AT_bit_size for _BitInt types and others (PR #164372)

Orlando Cazalet-Hyams via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 04:22:37 PDT 2025


================
@@ -1540,13 +1540,13 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
                                 ? static_cast<DINode::DIFlags>(Record[6])
                                 : DINode::FlagZero;
     uint32_t NumExtraInhabitants = (Record.size() > 7) ? Record[7] : 0;
-
+    uint32_t DataSizeInBits = (Record.size() > 8) ? Record[8] : 0;
----------------
OCHyams wrote:

If I remove the `(Record.size() > 7)` check for `NumExtraInhabitants ` these tests fail, if that's what you were looking for?
```
Failed Tests (22):
  LLVM :: Bitcode/DIExpression-4.0.ll
  LLVM :: Bitcode/DIExpression-aggresult.ll
  LLVM :: Bitcode/DIExpression-deref.ll
  LLVM :: Bitcode/DIExpression-minus-upgrade.ll
  LLVM :: Bitcode/DIGlobalVariableExpression.ll
  LLVM :: Bitcode/DIGlobalVariableExpression2.ll
  LLVM :: Bitcode/DIImportedEntity_backward.ll
  LLVM :: Bitcode/DIModule-fortran-module.ll
  LLVM :: Bitcode/DINamespace.ll
  LLVM :: Bitcode/DISubprogram-v5.ll
  LLVM :: Bitcode/DITemplateParameter-5.0.ll
  LLVM :: Bitcode/apple-clang-700-compat.test
  LLVM :: Bitcode/diglobalvariable-3.8.ll
  LLVM :: Bitcode/dilocalvariable-3.9.ll
  LLVM :: Bitcode/disubrange-v0.ll
  LLVM :: Bitcode/fortranSubrangeBackward.ll
  LLVM :: Bitcode/invalid.test
  LLVM :: Bitcode/upgrade-cu-locals.ll
  LLVM :: Bitcode/upgrade-dbg-addr.ll
  LLVM :: Bitcode/upgrade-dbg-value.ll
  LLVM :: Bitcode/upgrade-pointer-address-space.ll
  LLVM :: ThinLTO/X86/drop-debug-info.ll
  ```

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


More information about the cfe-commits mailing list