aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-25 23:57:05 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-25 23:57:05 +0000
commit3ac83d69c61238cd0d38e90fcdd03390530ab2fb (patch)
treee74bebe83a7491346eb921eb84bbb312b15eab96 /include/clang
parentb2274d64ecb67f6c8bff2e66361844bebbcc3dab (diff)
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/Decl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index 8b9688baea..cfcbeb2c00 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -2930,6 +2930,10 @@ class RecordDecl : public TagDecl {
/// HasObjectMember - This is true if this struct has at least one member
/// containing an Objective-C object pointer type.
bool HasObjectMember : 1;
+
+ /// HasVolatileMember - This is true if struct has at least one member of
+ /// 'volatile' type.
+ bool HasVolatileMember : 1;
/// \brief Whether the field declarations of this record have been loaded
/// from external storage. To avoid unnecessary deserialization of
@@ -2986,6 +2990,9 @@ public:
bool hasObjectMember() const { return HasObjectMember; }
void setHasObjectMember (bool val) { HasObjectMember = val; }
+ bool hasVolatileMember() const { return HasVolatileMember; }
+ void setHasVolatileMember (bool val) { HasVolatileMember = val; }
+
/// \brief Determines whether this declaration represents the
/// injected class name.
///