[PATCH] D57668: [opaque pointer types] Pass function types for runtime function calls.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 4 13:23:57 PST 2019


dblaikie added inline comments.


================
Comment at: clang/lib/CodeGen/CGObjC.cpp:1028-1030
+    llvm::Constant *getPropertyFn = cast<llvm::Constant>(
+        CGM.getObjCRuntime().GetPropertyGetFunction().getCallee());
     if (!getPropertyFn) {
----------------
This code looks like it implies that the 'if' is never hit? (since cast doesn't propagate null (it asserts/fails/UB on null)) - should this be cast_or_null instead? Or "if(!CGM.getObjCRuntime().getPropertyGetFunction())" ?)

(there are a few similar instances later on)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D57668





More information about the cfe-commits mailing list