================
@@ -1062,4 +1062,84 @@ bool DiagnoseUnguardedBuiltins::VisitCallExpr(CallExpr
*CE) {
void SemaAMDGPU::DiagnoseUnguardedBuiltinUsage(FunctionDecl *FD) {
DiagnoseUnguardedBuiltins(SemaRef).IssueDiagnostics(FD->getBody());
}
+
+static FieldDecl *getNamedBarrierField(const RecordDecl *R) {
+ for (FieldDecl *FD : R->fields()) {
+ QualType FDTy = FD->getType();
+ if (FDTy->isAMDGPUNamedBarrierTypeOrWrapper())
+ return FD;
+ }
+
+ return nullptr;
+}
+
+void SemaAMDGPU::checkNamedBarrierWrapper(RecordDecl *R) {
+ if (R->isInvalidDecl())
----------------
Pierre-vh wrote:
Should this be restricted to AMDGPU targets only ? Otherwise it runs on all
class declarations.
What's the easiest way to check if we have any AMDGPU target feature available
on the target/aux target?
https://github.com/llvm/llvm-project/pull/207687
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits