[PATCH 3/3] Try to perform OpenCL type initialization in C++
Adam Strzelecki
ono at java.pl
Sun May 18 16:29:15 PDT 2014
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)
More information about the cfe-commits
mailing list