1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Assembler/disubrange-empty-array.ll
Alok Kumar Sharma 6077c65472 [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays
This patch upgrades DISubrange to support fortran requirements.

Summary:
Below are the updates/addition of fields.
lowerBound - Now accepts signed integer or DIVariable or DIExpression,
earlier it accepted only signed integer.
upperBound - This field is now added and accepts signed interger or
DIVariable or DIExpression.
stride - This field is now added and accepts signed interger or
DIVariable or DIExpression.
This is required to describe bounds of array which are known at runtime.

Testing:
unit test cases added (hand-written)
check clang
check llvm
check debug-info

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D80197
2020-05-28 13:46:41 +05:30

15 lines
508 B
LLVM

; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
; CHECK: !named = !{!0, !0, !1, !2}
!named = !{!0, !1, !2, !3}
; CHECK: !0 = !DISubrange(count: -1, lowerBound: 0)
; CHECK-NEXT: !1 = !DISubrange(count: -1, lowerBound: 4)
; CHECK-NEXT: !2 = !DISubrange(count: -1, lowerBound: -5)
!0 = !DISubrange(count: -1, lowerBound: 0)
!1 = !DISubrange(count: -1, lowerBound: 0)
!2 = !DISubrange(count: -1, lowerBound: 4)
!3 = !DISubrange(count: -1, lowerBound: -5)