aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprCXX.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2012-07-09 21:15:43 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2012-07-09 21:15:43 +0000
commit34f60a4a7fb87e9f4dfd08f8751ce76db9981215 (patch)
tree19a125744306c282614a621f2fe64458f30b56dc /lib/CodeGen/CGExprCXX.cpp
parent6749ae1dbcc9e45ade21b05c6542a6354903ad77 (diff)
The delete argument should not be converted to void*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
-rw-r--r--lib/CodeGen/CGExprCXX.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp
index d9dd776410..79ebe515b0 100644
--- a/lib/CodeGen/CGExprCXX.cpp
+++ b/lib/CodeGen/CGExprCXX.cpp
@@ -1533,18 +1533,7 @@ static void EmitArrayDelete(CodeGenFunction &CGF,
}
void CodeGenFunction::EmitCXXDeleteExpr(const CXXDeleteExpr *E) {
-
- // Get at the argument before we performed the implicit conversion
- // to void*.
const Expr *Arg = E->getArgument();
- while (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
- if (ICE->getCastKind() != CK_UserDefinedConversion &&
- ICE->getType()->isVoidPointerType())
- Arg = ICE->getSubExpr();
- else
- break;
- }
-
llvm::Value *Ptr = EmitScalarExpr(Arg);
// Null check the pointer.