get rid of windows warning:
authorPeng Cheng <gm4cheng@gmail.com>
Wed, 1 May 2013 15:00:07 +0000 (15:00 +0000)
committerPeng Cheng <gm4cheng@gmail.com>
Wed, 1 May 2013 15:00:07 +0000 (15:00 +0000)
warning C4800: forcing value to bool 'true' or 'false' (performance warning)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180851 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/DerivedTypes.h

index 6c00f596badc09b5ce40fd2e5097cc08a3c74c4a..e279e60e47681572680da6b698048f8a03b59018 100644 (file)
@@ -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;