summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_default_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-05-20 03:46:04 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-05-20 03:46:04 +0000
commit16dc7b68c4d90cd3abac7015c27030f3d6c710f9 (patch)
tree88c7090be664baa4ac9b397a65a20821304d4e8c /clang/test/OpenMP/parallel_default_messages.cpp
parent1f294fd934c17ec9836cbde8293d3c51974cdb05 (diff)
downloadbcm5719-llvm-16dc7b68c4d90cd3abac7015c27030f3d6c710f9.tar.gz
bcm5719-llvm-16dc7b68c4d90cd3abac7015c27030f3d6c710f9.zip
Fix for aggregate copying of variable length arrays.
Patch fixes codegen for aggregate copying of VLAs. Currently method CodeGenFunction::EmitAggregateCopy() does not support copying of VLAs. Patch checks if the size of the type is 0, then checks if the type is actually a variable-length array. Then it calculates total length for this array and calculates total size of the array in bytes: <total number of elements in array> * aligned_sizeof(ElementType) (if copy assignment is requested). If simple copying is requested, size is calculated like: <total number of elements in array> * aligned_sizeof(ElementType) - aligned_sizeof(ElementType) + sizeof(ElementType). memcpy() is used with this calculated size of the VLA. Differential Revision: http://reviews.llvm.org/D9851 llvm-svn: 237768
Diffstat (limited to 'clang/test/OpenMP/parallel_default_messages.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud