diff options
author | Eric Christopher <echristo@apple.com> | 2012-05-08 18:56:47 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-05-08 18:56:47 +0000 |
commit | c0e7a3d78c2e64d6b3a4e721407863dd0cfd010e (patch) | |
tree | b64411b9baa9195ac161303cbe6853f7a928f4db /clang/test/CodeGen | |
parent | 40d057fd7d5e0a8450794c2833018a813b8af496 (diff) | |
download | bcm5719-llvm-c0e7a3d78c2e64d6b3a4e721407863dd0cfd010e.tar.gz bcm5719-llvm-c0e7a3d78c2e64d6b3a4e721407863dd0cfd010e.zip |
The address of a vla is actually complex and requires a dereference.
Part of rdar://11352000
llvm-svn: 156407
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r-- | clang/test/CodeGen/debug-info-vla.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-vla.c b/clang/test/CodeGen/debug-info-vla.c new file mode 100644 index 00000000000..20fb6aace41 --- /dev/null +++ b/clang/test/CodeGen/debug-info-vla.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s + +// CHECK: metadata !{i32 {{.*}}, metadata {{.*}}, metadata !"vla", metadata {{.*}}, i32 7, metadata {{.*}}, i32 0, i32 0, i64 2} ; [ DW_TAG_auto_variable ] + +void testVLAwithSize(int s) +{ + int vla[s]; + int i; + for (i = 0; i < s; i++) { + vla[i] = i*i; + } +} |