Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/Sema.cpp
Show First 20 Lines • Show All 327 Lines • ▼ Show 20 Lines | void Sema::Initialize() { | ||||
if (getLangOpts().OpenCL) { | if (getLangOpts().OpenCL) { | ||||
getOpenCLOptions().addSupport( | getOpenCLOptions().addSupport( | ||||
Context.getTargetInfo().getSupportedOpenCLOpts(), getLangOpts()); | Context.getTargetInfo().getSupportedOpenCLOpts(), getLangOpts()); | ||||
addImplicitTypedef("sampler_t", Context.OCLSamplerTy); | addImplicitTypedef("sampler_t", Context.OCLSamplerTy); | ||||
addImplicitTypedef("event_t", Context.OCLEventTy); | addImplicitTypedef("event_t", Context.OCLEventTy); | ||||
if (getLangOpts().OpenCLCPlusPlus || getLangOpts().OpenCLVersion >= 200) { | if (getLangOpts().OpenCLCPlusPlus || getLangOpts().OpenCLVersion >= 200) { | ||||
addImplicitTypedef("clk_event_t", Context.OCLClkEventTy); | addImplicitTypedef("clk_event_t", Context.OCLClkEventTy); | ||||
addImplicitTypedef("queue_t", Context.OCLQueueTy); | addImplicitTypedef("queue_t", Context.OCLQueueTy); | ||||
if (getLangOpts().OpenCLPipes) | |||||
addImplicitTypedef("reserve_id_t", Context.OCLReserveIDTy); | addImplicitTypedef("reserve_id_t", Context.OCLReserveIDTy); | ||||
addImplicitTypedef("atomic_int", Context.getAtomicType(Context.IntTy)); | addImplicitTypedef("atomic_int", Context.getAtomicType(Context.IntTy)); | ||||
addImplicitTypedef("atomic_uint", | addImplicitTypedef("atomic_uint", | ||||
Context.getAtomicType(Context.UnsignedIntTy)); | Context.getAtomicType(Context.UnsignedIntTy)); | ||||
addImplicitTypedef("atomic_float", | addImplicitTypedef("atomic_float", | ||||
Context.getAtomicType(Context.FloatTy)); | Context.getAtomicType(Context.FloatTy)); | ||||
// OpenCLC v2.0, s6.13.11.6 requires that atomic_flag is implemented as | // OpenCLC v2.0, s6.13.11.6 requires that atomic_flag is implemented as | ||||
// 32-bit integer and OpenCLC v2.0, s6.1.1 int is always 32-bit wide. | // 32-bit integer and OpenCLC v2.0, s6.1.1 int is always 32-bit wide. | ||||
addImplicitTypedef("atomic_flag", Context.getAtomicType(Context.IntTy)); | addImplicitTypedef("atomic_flag", Context.getAtomicType(Context.IntTy)); | ||||
▲ Show 20 Lines • Show All 2,210 Lines • Show Last 20 Lines |