[llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Feb 4 17:38:52 PST 2005



Changes in directory llvm/lib/VMCore:

Instructions.cpp updated: 1.10 -> 1.11
---
Log message:

Instead of initializing the volatile field, use accessors to set it.


---
Diffs of the changes:  (+16 -11)

 Instructions.cpp |   27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.10 llvm/lib/VMCore/Instructions.cpp:1.11
--- llvm/lib/VMCore/Instructions.cpp:1.10	Fri Jan 28 19:05:12 2005
+++ llvm/lib/VMCore/Instructions.cpp	Fri Feb  4 19:38:38 2005
@@ -498,27 +498,31 @@
 
 LoadInst::LoadInst(Value *Ptr, const std::string &Name, Instruction *InsertBef)
   : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
-                     Load, Ptr, Name, InsertBef), Volatile(false) {
+                     Load, Ptr, Name, InsertBef) {
+  setVolatile(false);
   AssertOK();
 }
 
 LoadInst::LoadInst(Value *Ptr, const std::string &Name, BasicBlock *InsertAE)
   : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
-                     Load, Ptr, Name, InsertAE), Volatile(false) {
+                     Load, Ptr, Name, InsertAE) {
+  setVolatile(false);
   AssertOK();
 }
 
 LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
                    Instruction *InsertBef)
   : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
-                     Load, Ptr, Name, InsertBef), Volatile(isVolatile) {
+                     Load, Ptr, Name, InsertBef) {
+  setVolatile(isVolatile);
   AssertOK();
 }
 
 LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
                    BasicBlock *InsertAE)
   : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
-                     Load, Ptr, Name, InsertAE), Volatile(isVolatile) {
+                     Load, Ptr, Name, InsertAE) {
+  setVolatile(isVolatile);
   AssertOK();
 }
 
@@ -537,35 +541,36 @@
 
 
 StoreInst::StoreInst(Value *val, Value *addr, Instruction *InsertBefore)
-  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertBefore),
-    Volatile(false) {
+  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertBefore) {
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
+  setVolatile(false);
   AssertOK();
 }
 
 StoreInst::StoreInst(Value *val, Value *addr, BasicBlock *InsertAtEnd)
-  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertAtEnd), Volatile(false) {
+  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertAtEnd) {
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
+  setVolatile(false);
   AssertOK();
 }
 
 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, 
                      Instruction *InsertBefore)
-  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertBefore),
-    Volatile(isVolatile) {
+  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertBefore) {
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
+  setVolatile(isVolatile);
   AssertOK();
 }
 
 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, 
                      BasicBlock *InsertAtEnd)
-  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertAtEnd),
-    Volatile(isVolatile) {
+  : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertAtEnd) {
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
+  setVolatile(isVolatile);
   AssertOK();
 }
 






More information about the llvm-commits mailing list