[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 21 15:27:42 PDT 2025
================
@@ -6165,6 +6254,18 @@ bool UnnamedLocalNoLinkageFinder::VisitHLSLAttributedResourceType(
return Visit(T->getWrappedType());
}
+bool UnnamedLocalNoLinkageFinder::VisitHLSLInlineSpirvType(
+ const HLSLInlineSpirvType *T) {
+ for (auto &Operand : T->getOperands()) {
+ if (Operand.isConstant() && Operand.isLiteral()) {
+ if (Visit(Operand.getResultType())) {
+ return true;
+ }
+ }
+ }
----------------
llvm-beanz wrote:
nit: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
```suggestion
for (auto &Operand : T->getOperands())
if (Operand.isConstant() && Operand.isLiteral())
if (Visit(Operand.getResultType()))
return true;
```
https://github.com/llvm/llvm-project/pull/134034
More information about the cfe-commits
mailing list