Simplify the logic for setVolatile.
authorDan Gohman <gohman@apple.com>
Fri, 20 Jul 2007 23:14:50 +0000 (23:14 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 20 Jul 2007 23:14:50 +0000 (23:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40130 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index 2f001c654a2c8fcf551239eefab617c6a1a6aebf..24122986b8af9c4fda0e41fa8b6604cc325d5861 100644 (file)
@@ -253,7 +253,7 @@ public:
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
   void setVolatile(bool V) { 
-    SubclassData = (SubclassData & ~1) | ((V) ? 1 : 0)
+    SubclassData = (SubclassData & ~1) | V
   }
 
   virtual LoadInst *clone() const;
@@ -321,7 +321,7 @@ public:
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
   void setVolatile(bool V) { 
-    SubclassData = (SubclassData & ~1) | ((V) ? 1 : 0)
+    SubclassData = (SubclassData & ~1) | V
   }
 
   /// Transparently provide more efficient getOperand methods.