diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2014-07-02 07:05:22 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-07-02 07:05:22 +0000 |
| commit | f94baeb363a0c012563c19b7e1e281496543380c (patch) | |
| tree | 0d206c476f71a240a46c86c59cbf68b22841c1c2 | |
| parent | b57d6911575e96cd1e73d63216d002f8168285d1 (diff) | |
| download | bcm5719-llvm-f94baeb363a0c012563c19b7e1e281496543380c.tar.gz bcm5719-llvm-f94baeb363a0c012563c19b7e1e281496543380c.zip | |
Added test for capturing VLA types if the captured variable is a function parameter.
llvm-svn: 212170
| -rw-r--r-- | clang/test/CodeGen/captured-statements.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/captured-statements.c b/clang/test/CodeGen/captured-statements.c index 4ff87910c22..feb12673f0b 100644 --- a/clang/test/CodeGen/captured-statements.c +++ b/clang/test/CodeGen/captured-statements.c @@ -60,6 +60,19 @@ void test3(int size) { // CHECK-3: call void @__captured_stmt } +// Capture VLA array +void test4(int size, int vla_arr[size]) { + #pragma clang __debug captured + { + vla_arr[0] = 1; + } + // CHECK-3: test4([[INT:i.+]] [[SIZE:.+]], [[INT]]* + // CHECK-3: store [[INT]] [[SIZE]], [[INT]]* [[SIZE_ADDR:.+]], + // CHECK-3: [[REF:%.+]] = getelementptr inbounds + // CHECK-3: store [[INT]]* [[SIZE_ADDR]], [[INT]]** [[REF]] + // CHECK-3: call void @__captured_stmt +} + void dont_capture_global() { static int s; extern int e; |

