summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-02 15:34:35 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-02 15:34:35 +0000
commit262e4e2ab542c432c020a0d2a34d9f815b3e665a (patch)
tree3a96d6a29f41a62dc5626048b92323c50afb459b /clang/lib/CodeGen/CGExprCXX.cpp
parentcd495039cc98e9a05b50e8c0bc9091d2cf5cb6cf (diff)
downloadbcm5719-llvm-262e4e2ab542c432c020a0d2a34d9f815b3e665a.tar.gz
bcm5719-llvm-262e4e2ab542c432c020a0d2a34d9f815b3e665a.zip
Fix more i1/i8 pointer madness. Here, an overactive assertion
complains when the element type of a C++ "delete" expression is different from what we would expect from the pointer type. When deleting a bool*, we end up with an i1 on one side (where we compute the LLVM type from the Clang bool type) and i8 on the other (where we grab the LLVM type from the LLVM pointer type). I've weakened the assertion appropriately, and the Boost Parallel Graph Library now passes its regression tests. llvm-svn: 112821
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprCXX.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp
index 5e417605b1e..e0c8280e6b7 100644
--- a/clang/lib/CodeGen/CGExprCXX.cpp
+++ b/clang/lib/CodeGen/CGExprCXX.cpp
@@ -1018,8 +1018,9 @@ void CodeGenFunction::EmitCXXDeleteExpr(const CXXDeleteExpr *E) {
Ptr = Builder.CreateInBoundsGEP(Ptr, GEP.begin(), GEP.end(), "del.first");
}
- assert(ConvertType(DeleteTy) ==
- cast<llvm::PointerType>(Ptr->getType())->getElementType());
+ assert(DeleteTy->isBooleanType() ||
+ (ConvertType(DeleteTy) ==
+ cast<llvm::PointerType>(Ptr->getType())->getElementType()));
if (E->isArrayForm()) {
EmitArrayDelete(*this, E->getOperatorDelete(), Ptr, DeleteTy);
OpenPOWER on IntegriCloud