Skip to content

Commit 731d639

Browse files
AlexeySachkovFznamznon
authored andcommitted
[SYCL] Avoid usage of deprecated LLVM API (#958)
LLVM commit 531c116 ("Resubmit "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove"", 2019-12-16) deprecated the variants that do not take `MaybeAlign` arguments. Signed-off-by: Alexey Sachkov <[email protected]> Co-Authored-By: Mariya Podchishchaeva <[email protected]>
1 parent ccbe51e commit 731d639

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/lib/CodeGen/SYCLLowerIR/LowerWGScope.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,10 @@ static void copyBetweenLocalAndShadow(AllocaInst *L, GlobalVariable *Shadow,
380380
Type *T = L->getAllocatedType();
381381

382382
if (T->isAggregateType()) {
383-
auto LocAlign = L->getAlignment();
384-
auto ShdAlign = Shadow->getAlignment();
383+
// TODO: we should use methods which directly return MaybeAlign once such
384+
// are added to LLVM for AllocaInst and GlobalVariable
385+
auto LocAlign = MaybeAlign(L->getAlignment());
386+
auto ShdAlign = MaybeAlign(Shadow->getAlignment());
385387
Module &M = *L->getModule();
386388
auto SizeVal = M.getDataLayout().getTypeStoreSize(T);
387389
auto Size = ConstantInt::get(getSizeTTy(M), SizeVal);

0 commit comments

Comments
 (0)