Fix a code gen. crash synthesizing a destructor.
Fixes pr5660.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90283 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/virtual-destructor-synthesis.cpp b/test/CodeGenCXX/virtual-destructor-synthesis.cpp
new file mode 100644
index 0000000..b95218a
--- /dev/null
+++ b/test/CodeGenCXX/virtual-destructor-synthesis.cpp
@@ -0,0 +1,16 @@
+// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s
+
+struct box {
+  virtual ~box();
+};
+
+struct pile_box : public box {
+  pile_box(box *);
+};
+
+pile_box::pile_box(box *pp)
+{
+}
+
+// CHECK: call void @_ZdlPv
+