Skip to content

Commit 309e9c5

Browse files
authored
[Backport to 19] [NFC] Use hasAlignment helper (#2856) (#2883)
Handle all queries of `Alignment` decorations through one and the same helper function. (cherry picked from commit 6768532)
1 parent 3eb287b commit 309e9c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SPIRV/SPIRVReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3105,7 +3105,7 @@ void SPIRVToLLVM::transFunctionAttrs(SPIRVFunction *BF, Function *F) {
31053105
if (BA->hasDecorate(DecorationMaxByteOffset, 0, &MaxOffset))
31063106
Builder.addDereferenceableAttr(MaxOffset);
31073107
SPIRVWord AlignmentBytes = 0;
3108-
if (BA->hasDecorate(DecorationAlignment, 0, &AlignmentBytes))
3108+
if (BA->hasAlignment(&AlignmentBytes))
31093109
Builder.addAlignmentAttr(AlignmentBytes);
31103110
I->addAttrs(Builder);
31113111
}

0 commit comments

Comments
 (0)