[PATCH] D157479: [Clang][DebugInfo] Emit narrower base types for structured binding declarations that bind to struct bitfields
Tomas Matheson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 10 03:52:09 PDT 2023
tmatheson accepted this revision.
tmatheson added a comment.
This revision is now accepted and ready to land.
LGTM with a few cosmetic suggestions.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4772
+ QualType FinalTy = Context.getQualifiedType(IntTy, Quals);
+ Ty = getOrCreateType(FinalTy, Unit);
+ }
----------------
Can Ty be null? If not then it might be more understandable to return Ty here. If it can be null, does it make sense to fall back to `BD->getType()` below?
================
Comment at: clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp:1
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple aarch64-arm-none-eabi %s -o - | FileCheck %s
+
----------------
This test looks suitable for update_cc1_checks, maybe with a --filter argument and each object in it's own function so that the relevant output is next to the code that it relates to.
================
Comment at: clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp:6
+ unsigned int y : 16;
+};
+
----------------
This would be easier to check if the structs had meaningful names, e.g. S_16_16
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157479/new/
https://reviews.llvm.org/D157479
More information about the cfe-commits
mailing list