Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.
Patch by Cédric Venet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index fe58ca0..2d30ed5 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -208,7 +208,7 @@
AllocaInsertPt);
// Store the initial value into the alloca.
- Builder.CreateStore(Arg, DeclPtr);
+ Builder.CreateStore(Arg, DeclPtr,Ty.isVolatileQualified());
} else {
// Otherwise, if this is an aggregate, just use the input pointer.
DeclPtr = Arg;