summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ItaniumCXXABI.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 21:35:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 21:35:28 +0000
commite489f4451b6244af10ec548a442f4d5b6870b0c1 (patch)
tree5dc6cd37794791820f8ccd8610334583a14ea68a /lib/CodeGen/ItaniumCXXABI.cpp
parent2298981669bf3bd63335a4be179bc0f96823a8f4 (diff)
Vendor import of clang release_90 branch r369369:vendor/clang/clang-release_90-r369369
Notes
svn path=/vendor/clang/dist-release_90/; revision=351305 svn path=/vendor/clang/clang-release_90-r369369/; revision=351306; tag=vendor/clang/clang-release_90-r369369
Diffstat (limited to 'lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r--lib/CodeGen/ItaniumCXXABI.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp
index 3b2413d960d6..51a2561a4552 100644
--- a/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/lib/CodeGen/ItaniumCXXABI.cpp
@@ -1755,10 +1755,11 @@ llvm::Value *ItaniumCXXABI::EmitVirtualDestructorCall(
CGCallee Callee = CGCallee::forVirtual(CE, GD, This, Ty);
QualType ThisTy;
- if (CE)
- ThisTy = CE->getImplicitObjectArgument()->getType()->getPointeeType();
- else
+ if (CE) {
+ ThisTy = CE->getObjectType();
+ } else {
ThisTy = D->getDestroyedType();
+ }
CGF.EmitCXXDestructorCall(GD, Callee, This.getPointer(), ThisTy, nullptr,
QualType(), nullptr);