[PATCH] D25850: [WIP] Accept nullability annotations (_Nullable) on array parameters
Adrian Prantl via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 25 13:14:07 PDT 2016
aprantl added inline comments.
================
Comment at: lib/CodeGen/CGDebugInfo.cpp:2493-2499
case Type::Adjusted:
- case Type::Decayed:
+ case Type::Decayed: {
// Decayed and adjusted types use the adjusted type in LLVM and DWARF.
- return CreateType(
- cast<PointerType>(cast<AdjustedType>(Ty)->getAdjustedType()), Unit);
+ QualType Adjusted = cast<AdjustedType>(Ty)->getAdjustedType();
+ (void)AttributedType::stripOuterNullability(Adjusted);
+ return CreateType(cast<PointerType>(Adjusted), Unit);
+ }
----------------
jordan_rose wrote:
> rsmith wrote:
> > I think this should be handled by `UnwrapTypeForDebugInfo` instead of here; this is after all just a type sugar node.
> Getting back to this today. I'm inclined to say we should just drop the AdjustedType node altogether in UnwrapTypeForDebugInfo. What do you think? (also for @aprantl)
Assuming that we don't want to support nullability attributes in the debug info that seems fine. At least at this point I don;t think there is a need to encode this in DWARF.
Repository:
rL LLVM
https://reviews.llvm.org/D25850
More information about the cfe-commits
mailing list