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

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 10 13:50:55 PDT 2019


erik.pilkington added inline comments.


================
Comment at: lib/CodeGen/CGObjC.cpp:2634-2646
+  ASTContext &Ctx = getContext();
+  const ImplicitParamDecl *paramDecl =
+      ImplicitParamDecl::Create(Ctx, nullptr, SourceLocation(), nullptr,
+                                Ctx.VoidPtrTy, ImplicitParamDecl::Other);
+  FunctionArgList funcArgs;
+  funcArgs.push_back(paramDecl);
+  const CGFunctionInfo &fnInfo =
----------------
Can't you just write `EmitCallOrInvoke(fn, value)`? See what we do in `emitObjCValueOperation`, which can handle this case.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61803/new/

https://reviews.llvm.org/D61803





More information about the cfe-commits mailing list