summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-03-02 05:19:19 +0800
committerGitHub <noreply@github.com>2024-03-01 13:19:19 -0800
commitcc9ada16b3dbbbd85f03faec74afc7bae4b8014c (patch)
treeaf65901e5508c13df707c85fed214878e3705153 /source/slang/slang-lower-to-ir.cpp
parenta4ba7d63e3035895b8081387b49a52b0fda53424 (diff)
Small cleanups for bitfield accessor synthesis (#3651)
* Remove duplicate function * neaten --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 17ce04fec..89fc00087 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -8878,9 +8878,9 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
void addBitFieldAccessorDecorations(IRInst* irFunc, Decl* decl)
{
- // If this is an accessor under a property we can move the bitfield
- // modifiers on the property to the accessor function.
- if(as<AccessorDecl>(decl) && as<PropertyDecl>(decl->parentDecl))
+ // If this is an accessor and the parent is describing some bitfield,
+ // we can move the bitfield modifiers to the accessor function.
+ if(as<AccessorDecl>(decl))
{
if(const auto bfm = decl->parentDecl->findModifier<BitFieldModifier>())
{