patch for PR9027 and // rdar://11861085
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 25 Jan 2013 23:57:05 +0000 (23:57 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 25 Jan 2013 23:57:05 +0000 (23:57 +0000)
commit7865220da4592eeaab51269aa39e11c4de9a5122
treedd222abbc78465c698a7bcb47827db08e9a41fae
parenta06572b58baadd46b55f54f6d57671b43105aded
patch for PR9027 and // rdar://11861085
Title: [PR9027] volatile struct bug: member is not loaded at -O;
This is caused by last flag passed to @llvm.memcpy being false,
not honoring that aggregate has at least one 'volatile' data member
(even though aggregate itself has not been qualified as 'volatile'.
As a result, optimization optimizes away the memcpy altogether.
Patch review by John MaCall (I still need to fix up a test though).

llvm-svn: 173535
clang/include/clang/AST/Decl.h
clang/lib/AST/Decl.cpp
clang/lib/AST/DeclCXX.cpp
clang/lib/CodeGen/CGExprAgg.cpp
clang/lib/CodeGen/CGValue.h
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/CodeGen/no-opt-volatile-memcpy.c [new file with mode: 0644]
clang/test/CodeGenCXX/no-opt-volatile-memcpy.cpp [new file with mode: 0644]