[llvm] r180851 - get rid of windows warning:
Peng Cheng
gm4cheng at gmail.com
Wed May 1 08:00:08 PDT 2013
Author: chp
Date: Wed May 1 10:00:07 2013
New Revision: 180851
URL: http://llvm.org/viewvc/llvm-project?rev=180851&view=rev
Log:
get rid of windows warning:
warning C4800: forcing value to bool 'true' or 'false' (performance warning)
Modified:
llvm/trunk/include/llvm/IR/DerivedTypes.h
Modified: llvm/trunk/include/llvm/IR/DerivedTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DerivedTypes.h?rev=180851&r1=180850&r2=180851&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DerivedTypes.h (original)
+++ llvm/trunk/include/llvm/IR/DerivedTypes.h Wed May 1 10:00:07 2013
@@ -117,7 +117,7 @@ public:
/// argument type.
static bool isValidArgumentType(Type *ArgTy);
- bool isVarArg() const { return getSubclassData(); }
+ bool isVarArg() const { return getSubclassData()!=0; }
Type *getReturnType() const { return ContainedTys[0]; }
typedef Type::subtype_iterator param_iterator;
More information about the llvm-commits
mailing list