Remove broken assert from CodeGen. Better check is done in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45358 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp
index f20c43f..81a0ced 100644
--- a/CodeGen/CGExprScalar.cpp
+++ b/CodeGen/CGExprScalar.cpp
@@ -756,10 +756,7 @@
   Value *RHS = Visit(E->getRHS());
   
   const QualType LHSType = E->getLHS()->getType().getCanonicalType();
-  const QualType RHSType = E->getRHS()->getType().getCanonicalType();
-  assert(LHSType == RHSType && "Can't subtract different pointer types");
-  
-  QualType LHSElementType = cast<PointerType>(LHSType)->getPointeeType();
+  const QualType LHSElementType = cast<PointerType>(LHSType)->getPointeeType();
   uint64_t ElementSize = CGF.getContext().getTypeSize(LHSElementType,
                                                       SourceLocation()) / 8;