summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-09-25 20:27:36 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-09-25 20:27:36 +0000
commit0c7eca334a0c8bdeb9b5cce6b6b0082170dd83ea (patch)
treedf83d64d5194124388c93b528077d8f86ad9930f
parent46d8a9300545b02835d68701e4574fc0a3cae693 (diff)
downloadbcm5719-llvm-0c7eca334a0c8bdeb9b5cce6b6b0082170dd83ea.tar.gz
bcm5719-llvm-0c7eca334a0c8bdeb9b5cce6b6b0082170dd83ea.zip
Avoid warnings about implicit conversions to `bool' in MSVC. This time
for real. Patch by Nathan Jeffords! llvm-svn: 114796
-rw-r--r--llvm/include/llvm/Analysis/DebugInfo.h4
-rw-r--r--llvm/include/llvm/Attributes.h2
-rw-r--r--llvm/include/llvm/Operator.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm/Analysis/DebugInfo.h b/llvm/include/llvm/Analysis/DebugInfo.h
index d01178fe3fe..d5733aeb75f 100644
--- a/llvm/include/llvm/Analysis/DebugInfo.h
+++ b/llvm/include/llvm/Analysis/DebugInfo.h
@@ -160,8 +160,8 @@ namespace llvm {
/// module does not contain any main compile unit then the code generator
/// will emit multiple compile units in the output object file.
- bool isMain() const { return getUnsignedField(6); }
- bool isOptimized() const { return getUnsignedField(7); }
+ bool isMain() const { return getUnsignedField(6) != 0; }
+ bool isOptimized() const { return getUnsignedField(7) != 0; }
StringRef getFlags() const { return getStringField(8); }
unsigned getRunTimeVersion() const { return getUnsignedField(9); }
diff --git a/llvm/include/llvm/Attributes.h b/llvm/include/llvm/Attributes.h
index 580ae7339e1..0325c89626b 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 static_cast<bool>(getAttributes(Idx) & Attr);
+ return (getAttributes(Idx) & Attr) != 0;
}
/// getParamAlignment - Return the alignment for the specified function
diff --git a/llvm/include/llvm/Operator.h b/llvm/include/llvm/Operator.h
index d8484176253..3aae586f144 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 static_cast<bool>(SubclassOptionalData & NoSignedWrap);
+ return (SubclassOptionalData & NoSignedWrap) != 0;
}
static inline bool classof(const OverflowingBinaryOperator *) { return true; }
OpenPOWER on IntegriCloud