[PATCH] D25850: [WIP] Accept nullability annotations (_Nullable) on array parameters

Jordan Rose via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 25 11:41:51 PDT 2016


jordan_rose 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);
+  }
----------------
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)


Repository:
  rL LLVM

https://reviews.llvm.org/D25850





More information about the cfe-commits mailing list