Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't crash generating debug info for VLA in function prototype.
Fixes regression from r279445. Differential Revision: https://reviews.llvm.org/D25793 llvm-svn: 284652
- Loading branch information
Eli Friedman
committed
Oct 19, 2016
1 parent
802e4a5
commit 01d6b96
Showing
2 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
// RUN: %clang -target x86_64-unknown-unknown -fverbose-asm -g -O0 -S -emit-llvm %s -o - | FileCheck %s | ||
// RUN: %clang -target x86_64-unknown-unknown -fverbose-asm -g -O0 -S -emit-llvm %s -o - -std=c++11 | FileCheck %s | ||
|
||
|
||
void f(int m) { | ||
int x[3][m]; | ||
} | ||
|
||
int (*fp)(int[][*]) = nullptr; | ||
|
||
// CHECK: !DICompositeType(tag: DW_TAG_array_type, | ||
// CHECK-NOT: size: | ||
// CHECK-SAME: align: 32 | ||
// CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]] | ||
// CHECK: [[ELEM_TYPE]] = !{[[NOCOUNT:.*]]} | ||
// CHECK: [[NOCOUNT]] = !DISubrange(count: -1) | ||
// | ||
// CHECK: !DICompositeType(tag: DW_TAG_array_type, | ||
// CHECK-NOT: size: | ||
// CHECK-SAME: align: 32 | ||
// CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]] | ||
// CHECK: [[ELEM_TYPE]] = !{[[SUB1:.*]], [[SUB2:.*]]} | ||
// CHECK: [[SUB1]] = !DISubrange(count: 3) | ||
// CHECK: [[SUB2]] = !DISubrange(count: -1) | ||
// CHECK: [[ELEM_TYPE]] = !{[[THREE:.*]], [[NOCOUNT]]} | ||
// CHECK: [[THREE]] = !DISubrange(count: 3) |