[CodeGen][ObjC] Emit invoke instead of call to call `objc_release` when
necessary.

Prior to r349952, clang used to call objc_msgSend when sending a release
messages, emitting an invoke instruction instead of a call instruction
when it was necessary to catch an exception. That changed in r349952
because runtime function objc_release is called as a nounwind function,
which broke programs that were overriding the dealloc method and
throwing an exception from it. This patch restores the behavior prior to
r349952.

rdar://problem/50253394

Differential Revision: https://reviews.llvm.org/D61803

llvm-svn: 360474
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index d5906cf..5b67565 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -2631,7 +2631,7 @@
   value = Builder.CreateBitCast(value, Int8PtrTy);
 
   // Call objc_release.
-  llvm::CallInst *call = EmitNounwindRuntimeCall(fn, value);
+  llvm::CallBase *call = EmitCallOrInvoke(fn, value);
 
   if (precise == ARCImpreciseLifetime) {
     call->setMetadata("clang.imprecise_release",