nvptx64 generates 2 targets: task and normal function for nvptx64 and export for avx only
This commit is contained in:
15
decl.cpp
15
decl.cpp
@@ -531,7 +531,7 @@ Declarator::InitFromType(const Type *baseType, DeclSpecs *ds) {
|
||||
returnType = returnType->ResolveUnboundVariability(Variability::Varying);
|
||||
|
||||
bool isTask = ds && ((ds->typeQualifiers & TYPEQUAL_TASK) != 0);
|
||||
if (isTask && g->target->getISA() == Target::NVPTX64)
|
||||
if (isTask && g->target->isPTX()) //getISA() == Target::NVPTX64)
|
||||
{
|
||||
ds->storageClass = SC_EXTERN_C;
|
||||
ds->typeQualifiers |= TYPEQUAL_UNMASKED;
|
||||
@@ -546,13 +546,12 @@ Declarator::InitFromType(const Type *baseType, DeclSpecs *ds) {
|
||||
"qualifiers");
|
||||
return;
|
||||
}
|
||||
#if 0 /* NVPTX64::task_and_externC */
|
||||
if (isExternC && isTask) {
|
||||
Error(pos, "Function can't have both \"extern \"C\"\" and \"task\" "
|
||||
"qualifiers");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (!g->target->isPTX())
|
||||
if (isExternC && isTask) {
|
||||
Error(pos, "Function can't have both \"extern \"C\"\" and \"task\" "
|
||||
"qualifiers");
|
||||
return;
|
||||
}
|
||||
if (isExternC && isExported) {
|
||||
Error(pos, "Function can't have both \"extern \"C\"\" and \"export\" "
|
||||
"qualifiers");
|
||||
|
||||
Reference in New Issue
Block a user