[PATCH] D73099: [Alignment][NFC] Deprecate Align::None()
This revision was automatically updated to reflect the committed changes. Closed by commit rG805c157e8aee: [Alignment][NFC] Deprecate Align::None() (authored by gchatelet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73099/new/ https://reviews.llvm.org/D73099 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGObjCMac.cpp llvm/include/llvm/CodeGen/AsmPrinter.h llvm/include/llvm/CodeGen/TargetFrameLowering.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/Support/Alignment.h llvm/lib/Analysis/Loads.cpp llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/CodeGen/GlobalISel/CallLowering.cpp llvm/lib/CodeGen/MIRPrinter.cpp llvm/lib/CodeGen/MachineBasicBlock.cpp llvm/lib/CodeGen/MachineFrameInfo.cpp llvm/lib/CodeGen/MachineOperand.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/ExecutionEngine/Orc/Speculation.cpp llvm/lib/IR/AutoUpgrade.cpp llvm/lib/IR/DataLayout.cpp llvm/lib/IR/IRBuilder.cpp llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.h llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp llvm/lib/Target/AMDGPU/R600FrameLowering.h llvm/lib/Target/AMDGPU/SIFrameLowering.h llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp llvm/lib/Target/ARM/ARMBasicBlockInfo.h llvm/lib/Target/ARM/ARMConstantIslandPass.cpp llvm/lib/Target/AVR/AVRFrameLowering.cpp llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp llvm/lib/Target/Hexagon/HexagonFrameLowering.h llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp llvm/lib/Target/Mips/MipsCallLowering.cpp llvm/lib/Target/Mips/MipsConstantIslandPass.cpp llvm/lib/Target/PowerPC/PPCBranchSelector.cpp llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Instrumentation/Instrumentation.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp llvm/lib/Transforms/Utils/InlineFunction.cpp llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp llvm/unittests/Support/AlignmentTest.cpp polly/lib/CodeGen/LoopGeneratorsKMP.cpp Index: polly/lib/CodeGen/LoopGeneratorsKMP.cpp === --- polly/lib/CodeGen/LoopGeneratorsKMP.cpp +++ polly/lib/CodeGen/LoopGeneratorsKMP.cpp @@ -468,7 +468,7 @@ // Global Variable Definitions GlobalVariable *StrVar = new GlobalVariable( *M, ArrayType, true, GlobalValue::PrivateLinkage, 0, ".str.ident"); -StrVar->setAlignment(llvm::Align::None()); +StrVar->setAlignment(llvm::Align(1)); SourceLocDummy = new GlobalVariable( *M, IdentTy, true, GlobalValue::PrivateLinkage, nullptr, LocName); Index: llvm/unittests/Support/AlignmentTest.cpp === --- llvm/unittests/Support/AlignmentTest.cpp +++ llvm/unittests/Support/AlignmentTest.cpp @@ -52,7 +52,6 @@ TEST(AlignmentTest, AlignDefaultCTor) { EXPECT_EQ(Align().value(), 1ULL); - EXPECT_EQ(Align::None().value(), 1ULL); } TEST(AlignmentTest, MaybeAlignDefaultCTor) { Index: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp === --- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -177,8 +177,7 @@ if (!isOnlyUsedInComparisonWithZero(CI)) return false; - if (!isDereferenceableAndAlignedPointer(Str, Align::None(), APInt(64, Len), - DL)) + if (!isDereferenceableAndAlignedPointer(Str, Align(1), APInt(64, Len), DL)) return false; if (CI->getFunction()->hasFnAttribute(Attribute::SanitizeMemory)) @@ -289,7 +288,7 @@ // We have enough information to now generate the memcpy call to do the // concatenation for us. Make a memcpy to copy the nul byte with align = 1. B.CreateMemCpy( - CpyDst, Align::None(), Src, Align::None(), + CpyDst, Align(1), Src, Align(1), ConstantInt::get(DL.getIntPtrType(Src->getContext()), Len + 1)); return Dst; } @@ -562,7 +561,7 @@ // We have enough information to now generate the memcpy call to do the // copy for us. Make a memcpy to copy the nul byte with align = 1. CallInst *NewCI = - B.CreateMemCpy(Dst, Align::None(), Src, Align::None(), + B.CreateMemCpy(Dst, Align(1), Src, Align(1), ConstantInt::get(DL.getIntPtrType(CI->getContext()), Len)); NewCI->setAttributes(CI->getAttributes()); return Dst; @@ -590,8 +589,7 @@ // We have enough information to now generate the memcpy call to do the // copy for us.
[PATCH] D73099: [Alignment][NFC] Deprecate Align::None()
gchatelet updated this revision to Diff 240148. gchatelet added a comment. - rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73099/new/ https://reviews.llvm.org/D73099 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGObjCMac.cpp llvm/include/llvm/CodeGen/AsmPrinter.h llvm/include/llvm/CodeGen/TargetFrameLowering.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/Support/Alignment.h llvm/lib/Analysis/Loads.cpp llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/CodeGen/GlobalISel/CallLowering.cpp llvm/lib/CodeGen/MIRPrinter.cpp llvm/lib/CodeGen/MachineBasicBlock.cpp llvm/lib/CodeGen/MachineFrameInfo.cpp llvm/lib/CodeGen/MachineOperand.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/ExecutionEngine/Orc/Speculation.cpp llvm/lib/IR/AutoUpgrade.cpp llvm/lib/IR/DataLayout.cpp llvm/lib/IR/IRBuilder.cpp llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.h llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp llvm/lib/Target/AMDGPU/R600FrameLowering.h llvm/lib/Target/AMDGPU/SIFrameLowering.h llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp llvm/lib/Target/ARM/ARMBasicBlockInfo.h llvm/lib/Target/ARM/ARMConstantIslandPass.cpp llvm/lib/Target/AVR/AVRFrameLowering.cpp llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp llvm/lib/Target/Hexagon/HexagonFrameLowering.h llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp llvm/lib/Target/Mips/MipsCallLowering.cpp llvm/lib/Target/Mips/MipsConstantIslandPass.cpp llvm/lib/Target/PowerPC/PPCBranchSelector.cpp llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Instrumentation/Instrumentation.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp llvm/lib/Transforms/Utils/InlineFunction.cpp llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp llvm/unittests/Support/AlignmentTest.cpp polly/lib/CodeGen/LoopGeneratorsKMP.cpp Index: polly/lib/CodeGen/LoopGeneratorsKMP.cpp === --- polly/lib/CodeGen/LoopGeneratorsKMP.cpp +++ polly/lib/CodeGen/LoopGeneratorsKMP.cpp @@ -468,7 +468,7 @@ // Global Variable Definitions GlobalVariable *StrVar = new GlobalVariable( *M, ArrayType, true, GlobalValue::PrivateLinkage, 0, ".str.ident"); -StrVar->setAlignment(llvm::Align::None()); +StrVar->setAlignment(llvm::Align(1)); SourceLocDummy = new GlobalVariable( *M, IdentTy, true, GlobalValue::PrivateLinkage, nullptr, LocName); Index: llvm/unittests/Support/AlignmentTest.cpp === --- llvm/unittests/Support/AlignmentTest.cpp +++ llvm/unittests/Support/AlignmentTest.cpp @@ -52,7 +52,6 @@ TEST(AlignmentTest, AlignDefaultCTor) { EXPECT_EQ(Align().value(), 1ULL); - EXPECT_EQ(Align::None().value(), 1ULL); } TEST(AlignmentTest, MaybeAlignDefaultCTor) { Index: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp === --- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -177,8 +177,7 @@ if (!isOnlyUsedInComparisonWithZero(CI)) return false; - if (!isDereferenceableAndAlignedPointer(Str, Align::None(), APInt(64, Len), - DL)) + if (!isDereferenceableAndAlignedPointer(Str, Align(1), APInt(64, Len), DL)) return false; if (CI->getFunction()->hasFnAttribute(Attribute::SanitizeMemory)) @@ -289,7 +288,7 @@ // We have enough information to now generate the memcpy call to do the // concatenation for us. Make a memcpy to copy the nul byte with align = 1. B.CreateMemCpy( - CpyDst, Align::None(), Src, Align::None(), + CpyDst, Align(1), Src, Align(1), ConstantInt::get(DL.getIntPtrType(Src->getContext()), Len + 1)); return Dst; } @@ -562,7 +561,7 @@ // We have enough information to now generate the memcpy call to do the // copy for us. Make a memcpy to copy the nul byte with align = 1. CallInst *NewCI = - B.CreateMemCpy(Dst, Align::None(), Src, Align::None(), + B.CreateMemCpy(Dst, Align(1), Src, Align(1), ConstantInt::get(DL.getIntPtrType(CI->getContext()), Len)); NewCI->setAttributes(CI->getAttributes()); return Dst; @@ -590,8 +589,7 @@ // We have enough information to now generate the memcpy call to do the // copy for us. Make a memcpy to copy the nul byte with align = 1. - CallInst *NewCI = -
[PATCH] D73099: [Alignment][NFC] Deprecate Align::None()
gchatelet updated this revision to Diff 239801. gchatelet added a comment. - Rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73099/new/ https://reviews.llvm.org/D73099 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGObjCMac.cpp llvm/include/llvm/CodeGen/AsmPrinter.h llvm/include/llvm/CodeGen/TargetFrameLowering.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/Support/Alignment.h llvm/lib/Analysis/Loads.cpp llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/CodeGen/GlobalISel/CallLowering.cpp llvm/lib/CodeGen/MIRPrinter.cpp llvm/lib/CodeGen/MachineBasicBlock.cpp llvm/lib/CodeGen/MachineFrameInfo.cpp llvm/lib/CodeGen/MachineOperand.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/ExecutionEngine/Orc/Speculation.cpp llvm/lib/IR/AutoUpgrade.cpp llvm/lib/IR/DataLayout.cpp llvm/lib/IR/IRBuilder.cpp llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.h llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp llvm/lib/Target/AMDGPU/R600FrameLowering.h llvm/lib/Target/AMDGPU/SIFrameLowering.h llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp llvm/lib/Target/ARM/ARMBasicBlockInfo.h llvm/lib/Target/ARM/ARMConstantIslandPass.cpp llvm/lib/Target/AVR/AVRFrameLowering.cpp llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp llvm/lib/Target/Hexagon/HexagonFrameLowering.h llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp llvm/lib/Target/Mips/MipsCallLowering.cpp llvm/lib/Target/Mips/MipsConstantIslandPass.cpp llvm/lib/Target/PowerPC/PPCBranchSelector.cpp llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Instrumentation/Instrumentation.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp llvm/lib/Transforms/Utils/InlineFunction.cpp llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp llvm/unittests/Support/AlignmentTest.cpp polly/lib/CodeGen/LoopGeneratorsKMP.cpp Index: polly/lib/CodeGen/LoopGeneratorsKMP.cpp === --- polly/lib/CodeGen/LoopGeneratorsKMP.cpp +++ polly/lib/CodeGen/LoopGeneratorsKMP.cpp @@ -468,7 +468,7 @@ // Global Variable Definitions GlobalVariable *StrVar = new GlobalVariable( *M, ArrayType, true, GlobalValue::PrivateLinkage, 0, ".str.ident"); -StrVar->setAlignment(llvm::Align::None()); +StrVar->setAlignment(llvm::Align(1)); SourceLocDummy = new GlobalVariable( *M, IdentTy, true, GlobalValue::PrivateLinkage, nullptr, LocName); Index: llvm/unittests/Support/AlignmentTest.cpp === --- llvm/unittests/Support/AlignmentTest.cpp +++ llvm/unittests/Support/AlignmentTest.cpp @@ -52,7 +52,6 @@ TEST(AlignmentTest, AlignDefaultCTor) { EXPECT_EQ(Align().value(), 1ULL); - EXPECT_EQ(Align::None().value(), 1ULL); } TEST(AlignmentTest, MaybeAlignDefaultCTor) { Index: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp === --- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -177,8 +177,7 @@ if (!isOnlyUsedInComparisonWithZero(CI)) return false; - if (!isDereferenceableAndAlignedPointer(Str, Align::None(), APInt(64, Len), - DL)) + if (!isDereferenceableAndAlignedPointer(Str, Align(1), APInt(64, Len), DL)) return false; if (CI->getFunction()->hasFnAttribute(Attribute::SanitizeMemory)) @@ -289,7 +288,7 @@ // We have enough information to now generate the memcpy call to do the // concatenation for us. Make a memcpy to copy the nul byte with align = 1. B.CreateMemCpy( - CpyDst, Align::None(), Src, Align::None(), + CpyDst, Align(1), Src, Align(1), ConstantInt::get(DL.getIntPtrType(Src->getContext()), Len + 1)); return Dst; } @@ -562,7 +561,7 @@ // We have enough information to now generate the memcpy call to do the // copy for us. Make a memcpy to copy the nul byte with align = 1. CallInst *NewCI = - B.CreateMemCpy(Dst, Align::None(), Src, Align::None(), + B.CreateMemCpy(Dst, Align(1), Src, Align(1), ConstantInt::get(DL.getIntPtrType(CI->getContext()), Len)); NewCI->setAttributes(CI->getAttributes()); return Dst; @@ -590,8 +589,7 @@ // We have enough information to now generate the memcpy call to do the // copy for us. Make a memcpy to copy the nul byte with align = 1. - CallInst *NewCI = -
[PATCH] D73099: [Alignment][NFC] Deprecate Align::None()
xbolva00 added a comment. +1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73099/new/ https://reviews.llvm.org/D73099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D73099: [Alignment][NFC] Deprecate Align::None()
gchatelet created this revision. gchatelet added reviewers: xbolva00, courbet. Herald added subscribers: llvm-commits, cfe-commits, kerbowa, Jim, jsji, atanasyan, jrtc27, kbarton, hiraditya, nhaehnle, jvesely, nemanjai, sdardis, dylanmckay, arsenm. Herald added a reviewer: bollu. Herald added projects: clang, LLVM. This is a follow up on https://reviews.llvm.org/D71473#inline-647262. There's a caveat here that `Align(1)` relies on the compiler understanding of `Log2_64` implementation to produce good code. One could use `Align()` as a replacement but I believe it is less clear that the alignment is one in that case. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73099 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGObjCMac.cpp llvm/include/llvm/CodeGen/AsmPrinter.h llvm/include/llvm/CodeGen/TargetFrameLowering.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/Support/Alignment.h llvm/lib/Analysis/Loads.cpp llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/CodeGen/GlobalISel/CallLowering.cpp llvm/lib/CodeGen/MIRPrinter.cpp llvm/lib/CodeGen/MachineBasicBlock.cpp llvm/lib/CodeGen/MachineFrameInfo.cpp llvm/lib/CodeGen/MachineOperand.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/ExecutionEngine/Orc/Speculation.cpp llvm/lib/IR/AutoUpgrade.cpp llvm/lib/IR/DataLayout.cpp llvm/lib/IR/IRBuilder.cpp llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.h llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp llvm/lib/Target/AMDGPU/R600FrameLowering.h llvm/lib/Target/AMDGPU/SIFrameLowering.h llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp llvm/lib/Target/ARM/ARMBasicBlockInfo.h llvm/lib/Target/ARM/ARMConstantIslandPass.cpp llvm/lib/Target/AVR/AVRFrameLowering.cpp llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp llvm/lib/Target/Hexagon/HexagonFrameLowering.h llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp llvm/lib/Target/Mips/MipsCallLowering.cpp llvm/lib/Target/Mips/MipsConstantIslandPass.cpp llvm/lib/Target/PowerPC/PPCBranchSelector.cpp llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Instrumentation/Instrumentation.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp llvm/lib/Transforms/Utils/InlineFunction.cpp llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp llvm/unittests/Support/AlignmentTest.cpp polly/lib/CodeGen/LoopGeneratorsKMP.cpp Index: polly/lib/CodeGen/LoopGeneratorsKMP.cpp === --- polly/lib/CodeGen/LoopGeneratorsKMP.cpp +++ polly/lib/CodeGen/LoopGeneratorsKMP.cpp @@ -468,7 +468,7 @@ // Global Variable Definitions GlobalVariable *StrVar = new GlobalVariable( *M, ArrayType, true, GlobalValue::PrivateLinkage, 0, ".str.ident"); -StrVar->setAlignment(llvm::Align::None()); +StrVar->setAlignment(llvm::Align(1)); SourceLocDummy = new GlobalVariable( *M, IdentTy, true, GlobalValue::PrivateLinkage, nullptr, LocName); Index: llvm/unittests/Support/AlignmentTest.cpp === --- llvm/unittests/Support/AlignmentTest.cpp +++ llvm/unittests/Support/AlignmentTest.cpp @@ -52,7 +52,6 @@ TEST(AlignmentTest, AlignDefaultCTor) { EXPECT_EQ(Align().value(), 1ULL); - EXPECT_EQ(Align::None().value(), 1ULL); } TEST(AlignmentTest, MaybeAlignDefaultCTor) { Index: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp === --- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -177,8 +177,7 @@ if (!isOnlyUsedInComparisonWithZero(CI)) return false; - if (!isDereferenceableAndAlignedPointer(Str, Align::None(), APInt(64, Len), - DL)) + if (!isDereferenceableAndAlignedPointer(Str, Align(1), APInt(64, Len), DL)) return false; if (CI->getFunction()->hasFnAttribute(Attribute::SanitizeMemory)) @@ -289,7 +288,7 @@ // We have enough information to now generate the memcpy call to do the // concatenation for us. Make a memcpy to copy the nul byte with align = 1. B.CreateMemCpy( - CpyDst, Align::None(), Src, Align::None(), + CpyDst, Align(1), Src, Align(1), ConstantInt::get(DL.getIntPtrType(Src->getContext()), Len + 1)); return Dst; } @@ -562,7 +561,7 @@ // We have enough information to now generate the memcpy call to do the // copy for us. Make a memcpy to copy the nul byte with align = 1.