================
@@ -282,14 +327,17 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs,
return;
}
} break;
- case ParsedAttr::UnknownAttribute:
- Diag(Loc, diag::err_unknown_hlsl_semantic) << II;
- return;
- case ParsedAttr::AT_HLSLSV_GroupThreadID:
- case ParsedAttr::AT_HLSLSV_GroupID:
- case ParsedAttr::AT_HLSLSV_GroupIndex:
- case ParsedAttr::AT_HLSLSV_DispatchThreadID:
- case ParsedAttr::AT_HLSLSV_Position:
+ case ParsedAttr::AT_HLSLUnparsedSemantic: {
+ ASTContext &Ctx = Actions.getASTContext();
+ ArgExprs.push_back(IntegerLiteral::Create(
+ Ctx, llvm::APInt(Ctx.getTypeSize(Ctx.IntTy), Semantic.Index),
Ctx.IntTy,
+ SourceLocation()));
+ ArgExprs.push_back(IntegerLiteral::Create(
+ Ctx, llvm::APInt(1, Semantic.Explicit), Ctx.BoolTy, SourceLocation()));
+ II = PP.getIdentifierInfo(Semantic.Name.upper());
----------------
Keenuts wrote:
Make sense, especially with the macro bit. Remove the `upper()` call and modify
the code to make it work without. Also added a test case for the macro sample
you shared.
https://github.com/llvm/llvm-project/pull/152537
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits