Provide more data to the user in the error message about unsupported
type for device compilation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365374
91177308-0d34-0410-b5e6-
96231b3b80d8
"expected loop invariant expression or '<invariant1> * %0 + <invariant2>' kind of expression">;
def err_omp_wrong_dependency_iterator_type : Error<
"expected an integer or a pointer type of the outer loop counter '%0' for non-rectangular nests">;
+def err_omp_unsupported_type : Error <
+ "host requires %0 bit size %1 type support, but device '%2' does not support it">;
} // end of OpenMP category
let CategoryName = "Related Result Type Issue" in {
!Context.getTargetInfo().hasFloat128Type()) ||
(Ty->isIntegerType() && Context.getTypeSize(Ty) == 128 &&
!Context.getTargetInfo().hasInt128Type()))
- targetDiag(E->getExprLoc(), diag::err_type_unsupported)
- << Ty << E->getSourceRange();
+ targetDiag(E->getExprLoc(), diag::err_omp_unsupported_type)
+ << static_cast<unsigned>(Context.getTypeSize(Ty)) << Ty
+ << Context.getTargetInfo().getTriple().str() << E->getSourceRange();
}
bool Sema::isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level) const {
char c;
T() : a(12), f(15) {}
#ifndef _ARCH_PPC
-// expected-error@+4 {{'__float128' is not supported on this target}}
+// expected-error@+4 {{host requires 128 bit size '__float128' type support, but device 'nvptx64-unknown-unknown' does not support it}}
#else
-// expected-error@+2 {{'long double' is not supported on this target}}
+// expected-error@+2 {{host requires 128 bit size 'long double' type support, but device 'nvptx64-unknown-unknown' does not support it}}
#endif
T &operator+(T &b) { f += b.a; return *this;}
};