Fix pr17875.

The assert this patch deletes was valid only when aliasing D2 to D1, not when
looking at a base class. Since the assert was in the path where we had already
decided to not produce an alias, just drop it.

llvm-svn: 194411
diff --git a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
index 745495a..1ab66a0 100644
--- a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
+++ b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
@@ -88,3 +88,18 @@
   B X;
   // CHECK-DAG: call i32 @__cxa_atexit({{.*}}@_ZN5test61AD2Ev
 }
+
+namespace test7 {
+  // Test that we don't produce an alias from ~B to ~A<int> (or crash figuring
+  // out if we should).
+  // pr17875.
+  // CHECK-DAG: define void @_ZN5test71BD2Ev
+  template <typename> struct A {
+    ~A() {}
+  };
+  class B : A<int> {
+    ~B();
+  };
+  template class A<int>;
+  B::~B() {}
+}