[llvm] r279990 - ASan: remove variable only used in assertions build
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 12:12:20 PDT 2016
Author: tnorthover
Date: Mon Aug 29 14:12:20 2016
New Revision: 279990
URL: http://llvm.org/viewvc/llvm-project?rev=279990&view=rev
Log:
ASan: remove variable only used in assertions build
Modified:
llvm/trunk/lib/Transforms/Utils/ASanStackFrameLayout.cpp
Modified: llvm/trunk/lib/Transforms/Utils/ASanStackFrameLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/ASanStackFrameLayout.cpp?rev=279990&r1=279989&r2=279990&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/ASanStackFrameLayout.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/ASanStackFrameLayout.cpp Mon Aug 29 14:12:20 2016
@@ -102,10 +102,9 @@ ComputeASanStackFrameLayout(SmallVectorI
SmallVector<uint8_t, 64>
GetShadowBytes(const SmallVectorImpl<ASanStackVariableDescription> &Vars,
const ASanStackFrameLayout &Layout) {
+ assert(Vars.size() > 0);
SmallVector<uint8_t, 64> SB;
SB.clear();
- const size_t NumVars = Vars.size();
- assert(NumVars > 0);
const size_t Granularity = Layout.Granularity;
SB.resize(Vars[0].Offset / Granularity, kAsanStackLeftRedzoneMagic);
for (const auto &Var : Vars) {
More information about the llvm-commits
mailing list