diff options
| author | Oscar Fuentes <ofv@wanadoo.es> | 2010-09-23 16:59:44 +0000 |
|---|---|---|
| committer | Oscar Fuentes <ofv@wanadoo.es> | 2010-09-23 16:59:44 +0000 |
| commit | d5f4130ffbb42dd1918ba05430523f00f14d8c96 (patch) | |
| tree | ff9c9591a87972f30e5da83e00060dd585d460f7 | |
| parent | 57214f533a7b9e48a0c5ba0f89b7219c7c9abbae (diff) | |
| download | bcm5719-llvm-d5f4130ffbb42dd1918ba05430523f00f14d8c96.tar.gz bcm5719-llvm-d5f4130ffbb42dd1918ba05430523f00f14d8c96.zip | |
Avoid warnings about conversions to `bool' in MS compilers.
Patch by Nathan Jeffords!
llvm-svn: 114662
| -rw-r--r-- | llvm/include/llvm/Attributes.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/Operator.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Attributes.h b/llvm/include/llvm/Attributes.h index 1296d67d525..580ae7339e1 100644 --- a/llvm/include/llvm/Attributes.h +++ b/llvm/include/llvm/Attributes.h @@ -223,7 +223,7 @@ public: /// paramHasAttr - Return true if the specified parameter index has the /// specified attribute set. bool paramHasAttr(unsigned Idx, Attributes Attr) const { - return getAttributes(Idx) & Attr; + return static_cast<bool>(getAttributes(Idx) & Attr); } /// getParamAlignment - Return the alignment for the specified function diff --git a/llvm/include/llvm/Operator.h b/llvm/include/llvm/Operator.h index 60865aa8ad4..d8484176253 100644 --- a/llvm/include/llvm/Operator.h +++ b/llvm/include/llvm/Operator.h @@ -99,7 +99,7 @@ public: /// hasNoSignedWrap - Test whether this operation is known to never /// undergo signed overflow, aka the nsw property. bool hasNoSignedWrap() const { - return SubclassOptionalData & NoSignedWrap; + return static_cast<bool>(SubclassOptionalData & NoSignedWrap); } static inline bool classof(const OverflowingBinaryOperator *) { return true; } |

