diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 0f797ec13ca..0d4ca0bcecf 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -932,7 +932,6 @@ struct FunctionStackPoisoner : public InstVisitor { SmallVector AllocaVec; SmallVector StaticAllocasToMoveUp; SmallVector RetVec; - unsigned StackAlignment; FunctionCallee AsanStackMallocFunc[kMaxAsanStackMallocSizeClass + 1], AsanStackFreeFunc[kMaxAsanStackMallocSizeClass + 1]; @@ -964,7 +963,6 @@ struct FunctionStackPoisoner : public InstVisitor { : F(F), ASan(ASan), DIB(*F.getParent(), /*AllowUnresolved*/ false), C(ASan.C), IntptrTy(ASan.IntptrTy), IntptrPtrTy(PointerType::get(IntptrTy, 0)), Mapping(ASan.Mapping), - StackAlignment(1 << Mapping.Scale), PoisonStack(ClStack && !Triple(F.getParent()->getTargetTriple()).isAMDGPU()) {} @@ -1088,7 +1086,6 @@ struct FunctionStackPoisoner : public InstVisitor { return; } - StackAlignment = std::max(StackAlignment, AI.getAlignment()); if (!AI.isStaticAlloca()) DynamicAllocaVec.push_back(&AI); else