Skip to content

Commit

Permalink
[Backport to 17] [NFC] Use hasAlignment helper (#2856)
Browse files Browse the repository at this point in the history
Handle all queries of `Alignment` decorations through one and the same
helper function.

(cherry picked from commit 6768532)
  • Loading branch information
svenvh committed Nov 26, 2024
1 parent 715592b commit acab99e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SPIRV/SPIRVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,7 +3087,7 @@ void SPIRVToLLVM::transFunctionAttrs(SPIRVFunction *BF, Function *F) {
if (BA->hasDecorate(DecorationMaxByteOffset, 0, &MaxOffset))
Builder.addDereferenceableAttr(MaxOffset);
SPIRVWord AlignmentBytes = 0;
if (BA->hasDecorate(DecorationAlignment, 0, &AlignmentBytes))
if (BA->hasAlignment(&AlignmentBytes))
Builder.addAlignmentAttr(AlignmentBytes);
I->addAttrs(Builder);
}
Expand Down

0 comments on commit acab99e

Please sign in to comment.