[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

Alexey Bader via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 6 02:39:40 PST 2018


bader accepted this revision.
bader added a comment.
This revision is now accepted and ready to land.

Hi Sam,

Sorry for the delay. LGTM, I have only minor refactoring suggestion.

Thanks,
Alexey



================
Comment at: lib/CodeGen/CGBlocks.cpp:1065-1067
+  llvm::Value *FuncPtr;
 
+  if (!CGM.getLangOpts().OpenCL) {
----------------
I think it would be more readable if we merge this if statement with the if statement at the line #1103.
It's used to initialize FuncPtr for non-OpenCL languages and the first use of this variable is in the else block of if statement at the line #1103.
If I didn't miss something it should reasonable to combine this if block with 'else' block at the line #1106.


https://reviews.llvm.org/D43783





More information about the cfe-commits mailing list