llvm-6502/test/Assembler/invalid-mdsubrange-count-negative.ll
Duncan P. N. Exon Smith c2c5e48ad5 IR: Allow MDSubrange to have 'count: -1'
It turns out that `count: -1` is a special value indicating an empty
array, such as `Values` in:

    struct T {
      unsigned Count;
      int Values[];
    };

Handle it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229769 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18 23:17:51 +00:00

8 lines
218 B
LLVM

; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
; CHECK-NOT: error
!0 = !MDSubrange(count: -1)
; CHECK: <stdin>:[[@LINE+1]]:25: error: value for 'count' too small, limit is -1
!0 = !MDSubrange(count: -2)