Skip to content

Commit 0fbe7f6

Browse files
authored
[Backport to 16] [NFC] Use hasAlignment helper (#2856) (#2880)
Handle all queries of `Alignment` decorations through one and the same helper function. (cherry picked from commit 6768532)
1 parent 2577a32 commit 0fbe7f6

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
@@ -3012,7 +3012,7 @@ void SPIRVToLLVM::transFunctionAttrs(SPIRVFunction *BF, Function *F) {
30123012
if (BA->hasDecorate(DecorationMaxByteOffset, 0, &MaxOffset))
30133013
Builder.addDereferenceableAttr(MaxOffset);
30143014
SPIRVWord AlignmentBytes = 0;
3015-
if (BA->hasDecorate(DecorationAlignment, 0, &AlignmentBytes))
3015+
if (BA->hasAlignment(&AlignmentBytes))
30163016
Builder.addAlignmentAttr(AlignmentBytes);
30173017
I->addAttrs(Builder);
30183018
}

0 commit comments

Comments
 (0)