[llvm-commits] [llvm] r114662 - in /llvm/trunk/include/llvm: Attributes.h Operator.h
Oscar Fuentes
ofv at wanadoo.es
Thu Sep 23 09:59:44 PDT 2010
Author: ofv
Date: Thu Sep 23 11:59:44 2010
New Revision: 114662
URL: http://llvm.org/viewvc/llvm-project?rev=114662&view=rev
Log:
Avoid warnings about conversions to `bool' in MS compilers.
Patch by Nathan Jeffords!
Modified:
llvm/trunk/include/llvm/Attributes.h
llvm/trunk/include/llvm/Operator.h
Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=114662&r1=114661&r2=114662&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Thu Sep 23 11:59:44 2010
@@ -223,7 +223,7 @@
/// 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
Modified: llvm/trunk/include/llvm/Operator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Operator.h?rev=114662&r1=114661&r2=114662&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Operator.h (original)
+++ llvm/trunk/include/llvm/Operator.h Thu Sep 23 11:59:44 2010
@@ -99,7 +99,7 @@
/// 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; }
More information about the llvm-commits
mailing list