aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Instructions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 0a61d120c2..40e31745ee 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -246,7 +246,7 @@ public:
/// setVolatile - Specify whether this is a volatile load or not.
///
- void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | (V) ? 1 : 0; }
+ void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | unsigned(V); }
virtual LoadInst *clone() const;
@@ -311,7 +311,7 @@ public:
/// setVolatile - Specify whether this is a volatile load or not.
///
- void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | (V) ? 1 : 0; }
+ void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | unsigned(V); }
/// Transparently provide more efficient getOperand methods.
Value *getOperand(unsigned i) const {