Skip to content

Commit 6932dc0

Browse files
authored
[Backport to 17] [NFC] Use hasAlignment helper (#2856) (#2881)
Handle all queries of `Alignment` decorations through one and the same helper function. (cherry picked from commit 6768532)
1 parent 715592b commit 6932dc0

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
@@ -3087,7 +3087,7 @@ void SPIRVToLLVM::transFunctionAttrs(SPIRVFunction *BF, Function *F) {
30873087
if (BA->hasDecorate(DecorationMaxByteOffset, 0, &MaxOffset))
30883088
Builder.addDereferenceableAttr(MaxOffset);
30893089
SPIRVWord AlignmentBytes = 0;
3090-
if (BA->hasDecorate(DecorationAlignment, 0, &AlignmentBytes))
3090+
if (BA->hasAlignment(&AlignmentBytes))
30913091
Builder.addAlignmentAttr(AlignmentBytes);
30923092
I->addAttrs(Builder);
30933093
}

0 commit comments

Comments
 (0)