reversed to original changes. Here is the plan to use CDP and genarate only device code with host wrapper..

This commit is contained in:
Evghenii
2013-11-12 12:51:56 +01:00
parent 3fd76d59ea
commit 4cd7e10ad3
6 changed files with 24 additions and 13 deletions

View File

@@ -533,8 +533,8 @@ Declarator::InitFromType(const Type *baseType, DeclSpecs *ds) {
bool isTask = ds && ((ds->typeQualifiers & TYPEQUAL_TASK) != 0);
if (isTask && g->target->isPTX()) //getISA() == Target::NVPTX64)
{
ds->storageClass = SC_EXTERN_C;
ds->typeQualifiers |= TYPEQUAL_UNMASKED;
// ds->storageClass = SC_EXTERN_C;
// ds->typeQualifiers |= TYPEQUAL_UNMASKED;
}
bool isExternC = ds && (ds->storageClass == SC_EXTERN_C);
@@ -546,7 +546,7 @@ Declarator::InitFromType(const Type *baseType, DeclSpecs *ds) {
"qualifiers");
return;
}
if (!g->target->isPTX())
// if (!g->target->isPTX())
if (isExternC && isTask) {
Error(pos, "Function can't have both \"extern \"C\"\" and \"task\" "
"qualifiers");