theraven added inline comments.

================
Comment at: lib/CodeGen/CGObjCRuntime.h:288
+  /// descriptor's symbol name.
+  virtual std::string getObjCEncodingForBlock(const BlockExpr *BE) const;
+
----------------
I'm not sure that this actually belongs in CGObjCRuntime.  The runtime doesn't 
care about the symbol namings, and the need for this mangling applies to any 
ELF platform (it would also apply to Mach-O if Mach-O adopted GNU-style symbol 
versioning).  It probably isn't relevant, for example, with WebAssembly, 
irrespective of the runtime, and it would be relevant for the Apple family of 
runtimes if anyone wanted to use them on ELF.  

If it does go in CGObjCRuntime, I think I'd prefer to have the implementation 
there as well and make it conditional on the object format, not on the runtime. 
 Having a function that maps Objective-C type encodings to valid symbol names 
in CGObjCRuntime would let us do a little bit of cleanup in CGObjCGNU* and 
could also be used in the blocks code.


Repository:
  rC Clang

https://reviews.llvm.org/D54539



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to