[PATCH] D140250: Define NULL in its own header

Ian Anderson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 24 14:39:46 PST 2023


iana added inline comments.


================
Comment at: llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll:37
 !7 = !DIFile(filename: "clang/12.0.0/include/__stddef_max_align_t.h", directory: "/")
-!8 = !DICompositeType(tag: DW_TAG_structure_type, file: !7, line: 19, size: 256, flags: DIFlagFwdDecl, identifier: "_ZTS11max_align_t")
-!9 = !DIFile(filename: "include/c++/7.5.0/cstddef", directory: "")
-!10 = !{i32 7, !"Dwarf Version", i32 4}
-!11 = !{i32 2, !"Debug Info Version", i32 3}
-!12 = !{i32 1, !"wchar_size", i32 4}
-!13 = !{!"clang version 12.0.0"}
-!14 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funDn", scope: !1, file: !1, line: 20, type: !15, scopeLine: 20, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !20)
-!15 = !DISubroutineType(types: !16)
-!16 = !{null, !17}
-!17 = !DIDerivedType(tag: DW_TAG_typedef, name: "nullptr_t", scope: !5, file: !18, line: 235, baseType: !19)
-!18 = !DIFile(filename: "include/x86_64-linux-gnu/c++/7.5.0/bits/c++config.h", directory: "")
-!19 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
-!20 = !{!21}
-!21 = !DILocalVariable(arg: 1, scope: !14, file: !1, line: 20, type: !17)
-!22 = distinct !DIAssignID()
-!23 = !DILocation(line: 0, scope: !14)
-!28 = distinct !DIAssignID()
-!29 = !DILocation(line: 20, column: 27, scope: !14)
+!8 = !DIFile(filename: "clang/12.0.0/include/__stddef_null.h", directory: "/")
+!9 = !DICompositeType(tag: DW_TAG_structure_type, file: !7, line: 19, size: 256, flags: DIFlagFwdDecl, identifier: "_ZTS11max_align_t")
----------------
dblaikie wrote:
> aaron.ballman wrote:
> > iana wrote:
> > > Adding this line is the only reason I changed this file. I'm not familiar at all with how these tests work, so I don't really know if it's necessary. The test passes with and without these changes.
> > CC @dblaikie and @echristo for questions about whether we should be updating this debug info test or not.
> Don't think there's any reason/need to - what motivated changing this file?
I found it when I was checking for places that handled `__stddef_max_align_t.h` specially. I'm not sure if that's in here to check `_ZTS11max_align_t` under it, or if it's just there because stddef.h includes it. __stddef_null.h doesn't define any types like that, so maybe it's fine to just revert this file?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140250/new/

https://reviews.llvm.org/D140250



More information about the cfe-commits mailing list