[PATCH] [OPENMP] Do not emit references to original variables in 'private' clause.

John McCall rjmccall at gmail.com
Mon May 18 15:56:39 PDT 2015

Can you expand a bit on what the task directive needs the capture field for if it's never initialized?  This feels like a very significant change, and I'd be a lot happier if the field could be dropped entirely.

At the very least, CapturedStmt need to document this.

Comment at: lib/CodeGen/CGStmt.cpp:2120
@@ +2119,3 @@
+    // Do not emit initialization for OpenMP private variables.
+    if (CurField->hasCapturedVLAType() || *I) {
+      LValue LV = EmitLValueForFieldInitialization(SlotLV, *CurField);
The more officially-approved way to do this would be to use "continue".  Not a big deal, though.



More information about the cfe-commits mailing list