Skip to content

Commit df90ab9

Browse files
committed
Revert "[SPIRV] Fix asan failure (#138695)"
Breaks bot: https://lab.llvm.org/buildbot/#/builders/24/builds/8151 This reverts commit 097fef2.
1 parent 6c764a6 commit df90ab9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,8 +2062,8 @@ void SPIRVGlobalRegistry::updateAssignType(CallInst *AssignCI, Value *Arg,
20622062

20632063
void SPIRVGlobalRegistry::addStructOffsetDecorations(
20642064
Register Reg, StructType *Ty, MachineIRBuilder &MIRBuilder) {
2065-
DataLayout DL;
2066-
ArrayRef<TypeSize> Offsets = DL.getStructLayout(Ty)->getMemberOffsets();
2065+
ArrayRef<TypeSize> Offsets =
2066+
DataLayout().getStructLayout(Ty)->getMemberOffsets();
20672067
for (uint32_t I = 0; I < Ty->getNumElements(); ++I) {
20682068
buildOpMemberDecorate(Reg, MIRBuilder, SPIRV::Decoration::Offset, I,
20692069
{static_cast<uint32_t>(Offsets[I])});

0 commit comments

Comments
 (0)