[PATCH] D80197: [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays
    Adrian Prantl via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed May 27 11:23:16 PDT 2020
    
    
  
aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.
Thanks! I think it would be good to update clang to explicitly pass a nullptr, then we won't have as much churn in the IR for existing testcases. I think this is ready to land with that patch applied.
================
Comment at: clang/test/CodeGen/debug-info-matrix-types.c:14
+  // CHECK: [[COLS]] = !DISubrange(count: 3, lowerBound: 0)
+  // CHECK: [[ROWS]] = !DISubrange(count: 2, lowerBound: 0)
   // CHECK: [[EXPR_A]] = !DILocalVariable(name: "a", arg: 1, {{.+}} type: [[PTR_TY]])
----------------
alok wrote:
> aprantl wrote:
> > Should we just make lowerBound implicit and only print it when it is non-null?
> Currently clang front-end is using old constructor for DISubrange which accepts lower as int, while using old constructor it passes zero (0) for lowerBound so it is explicit. Using new constructor and passing nullptr for lowerBound would make it not to be printed.
Would you mind preparing a patch for clang to use the new constructor? Then we wouldn't need to update all these testcases.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80197/new/
https://reviews.llvm.org/D80197
    
    
More information about the llvm-commits
mailing list