diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-18 23:17:51 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-18 23:17:51 +0000 |
commit | 5c9a17732bf07b2de850bd03e64c1dfa4030a50f (patch) | |
tree | 902d7e8be001b1062d1b119d62fca51aa87ca631 /llvm/test/Assembler/invalid-mdsubrange-count-negative.ll | |
parent | 7bb0738d825d0f8e0e3f36f945e9ae47c9b904f0 (diff) | |
download | bcm5719-llvm-5c9a17732bf07b2de850bd03e64c1dfa4030a50f.tar.gz bcm5719-llvm-5c9a17732bf07b2de850bd03e64c1dfa4030a50f.zip |
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.
llvm-svn: 229769
Diffstat (limited to 'llvm/test/Assembler/invalid-mdsubrange-count-negative.ll')
-rw-r--r-- | llvm/test/Assembler/invalid-mdsubrange-count-negative.ll | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/test/Assembler/invalid-mdsubrange-count-negative.ll b/llvm/test/Assembler/invalid-mdsubrange-count-negative.ll index 99cc8876750..92c0b4e7ca4 100644 --- a/llvm/test/Assembler/invalid-mdsubrange-count-negative.ll +++ b/llvm/test/Assembler/invalid-mdsubrange-count-negative.ll @@ -1,4 +1,7 @@ ; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s -; CHECK: [[@LINE+1]]:25: error: expected unsigned integer -!0 = !MDSubrange(count: -3) +; 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) |