[PATCH 3/3] Try to perform OpenCL type initialization in C++
James Molloy
james at jamesmolloy.co.uk
Mon May 19 05:45:32 PDT 2014
Hi Adam,
Is there a spec for OpenCL++ that I've missed somewhere? I can't seem to
find anything with a google.
Cheers,
James
On 19 May 2014 00:29, Adam Strzelecki <ono at java.pl> wrote:
> We may consider using OpenCL in C++ mode, so OpenCL type initialization
> should
> be performed regardless if we are using C or C++.
> ---
> lib/Sema/SemaInit.cpp | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
> index 63ddd72..092c2b3 100644
> --- a/lib/Sema/SemaInit.cpp
> +++ b/lib/Sema/SemaInit.cpp
> @@ -4569,6 +4569,12 @@ void InitializationSequence::InitializeFrom(Sema &S,
> return;
> }
>
> + // Try to init special OpenCL types
> + if (TryOCLSamplerInitialization(S, *this, DestType, Initializer) ||
> + TryOCLZeroEventInitialization(S, *this, DestType, Initializer)) {
> + return;
> + }
> +
> // Determine whether we should consider writeback conversions for
> // Objective-C ARC.
> bool allowObjCWritebackConversion = S.getLangOpts().ObjCAutoRefCount &&
> @@ -4583,12 +4589,6 @@ void InitializationSequence::InitializeFrom(Sema &S,
> return;
> }
>
> - if (TryOCLSamplerInitialization(S, *this, DestType, Initializer))
> - return;
> -
> - if (TryOCLZeroEventInitialization(S, *this, DestType, Initializer))
> - return;
> -
> // Handle initialization in C
> AddCAssignmentStep(DestType);
> MaybeProduceObjCObject(S, *this, Entity);
> --
> 1.8.5.2 (Apple Git-48)
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140519/232bd8be/attachment.html>
More information about the cfe-commits
mailing list