Skip to content

Commit ff9380b

Browse files
svenvhjsji
authored andcommitted
Use hasAlignment helper (#2856)
Handle all queries of `Alignment` decorations through one and the same helper function. Original commit: KhronosGroup/SPIRV-LLVM-Translator@67685320c1192af
1 parent 80da033 commit ff9380b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm-spirv/lib/SPIRV/SPIRVReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3158,7 +3158,7 @@ void SPIRVToLLVM::transFunctionAttrs(SPIRVFunction *BF, Function *F) {
31583158
if (BA->hasDecorate(DecorationMaxByteOffset, 0, &MaxOffset))
31593159
Builder.addDereferenceableAttr(MaxOffset);
31603160
SPIRVWord AlignmentBytes = 0;
3161-
if (BA->hasDecorate(DecorationAlignment, 0, &AlignmentBytes))
3161+
if (BA->hasAlignment(&AlignmentBytes))
31623162
Builder.addAlignmentAttr(AlignmentBytes);
31633163
I->addAttrs(Builder);
31643164
}

0 commit comments

Comments
 (0)