added #ifdef ISPC_NVPTX_ENALED ... #endif guards
This commit is contained in:
4
expr.cpp
4
expr.cpp
@@ -7880,12 +7880,14 @@ SizeOfExpr::TypeCheck() {
|
||||
"struct type \"%s\".", type->GetString().c_str());
|
||||
return NULL;
|
||||
}
|
||||
#ifdef ISPC_NVPTX_ENABLED
|
||||
if (type != NULL)
|
||||
if (g->target->getISA() == Target::NVPTX && type->IsVaryingType())
|
||||
{
|
||||
Error(pos, "\"sizeof\" with varying data types is not yet supported with \"nvptx\" target.");
|
||||
return NULL;
|
||||
}
|
||||
#endif /* ISPC_NVPTX_ENABLED */
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -8718,11 +8720,13 @@ NewExpr::TypeCheck() {
|
||||
AssertPos(pos, m->errorCount > 0);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef ISPC_NVPTX_ENABLED
|
||||
if (g->target->getISA() == Target::NVPTX && allocType->IsVaryingType())
|
||||
{
|
||||
Error(pos, "\"new\" with varying data types is not yet supported with \"nvptx\" target.");
|
||||
return NULL;
|
||||
}
|
||||
#endif /* ISPC_NVPTX_ENABLED */
|
||||
if (CastType<UndefinedStructType>(allocType) != NULL) {
|
||||
Error(pos, "Can't dynamically allocate storage for declared "
|
||||
"but not defined type \"%s\".", allocType->GetString().c_str());
|
||||
|
||||
Reference in New Issue
Block a user