It's not necessary to check if a value is null before delete[].
authorDan Gohman <gohman@apple.com>
Wed, 20 Aug 2008 14:55:37 +0000 (14:55 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 20 Aug 2008 14:55:37 +0000 (14:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55053 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APInt.cpp

index 80747fd12a9d9a249e3d98cbb365d9e8eb0293e6..3dcf84057bbabba5e88b0b5711dd058a5cf2e868 100644 (file)
@@ -106,7 +106,7 @@ APInt::APInt(const APInt& that)
 }
 
 APInt::~APInt() {
-  if (!isSingleWord() && pVal
+  if (!isSingleWord()) 
     delete [] pVal;
 }