]> granicus.if.org Git - clang/commitdiff
Change another is-a-pointer check to check in terms of LLVM type.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 25 Aug 2008 10:38:11 +0000 (10:38 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 25 Aug 2008 10:38:11 +0000 (10:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55312 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprScalar.cpp

index 963aeaf59c5cdf09d9fdf3d493798ef04f62c69a..11d1e8dfdb9e2ab770e77c104c903e4e4caab077 100644 (file)
@@ -336,7 +336,7 @@ Value *ScalarExprEmitter::EmitConversionToBool(Value *Src, QualType SrcType) {
     return Builder.CreateFCmpUNE(Src, Zero, "tobool");
   }
   
-  assert((SrcType->isIntegerType() || SrcType->isPointerType()) &&
+  assert((SrcType->isIntegerType() || isa<llvm::PointerType>(Src->getType())) &&
          "Unknown scalar type to convert");
   
   // Because of the type rules of C, we often end up computing a logical value,