From 4dc53e37d97c449d3ae86ec71bb879f19a1a6910 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 6 Dec 2010 21:48:10 +0000 Subject: [PATCH] Use a stronger predicate here, pointed out by Duncan llvm-svn: 121040 --- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 8c389475a2c7..adb089ece60b 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -277,7 +277,7 @@ static bool isObjectPointerWithTrustworthySize(const Value *V) { if (const AllocaInst *AI = dyn_cast(V)) return !AI->isArrayAllocation(); if (const GlobalVariable *GV = dyn_cast(V)) - return !GV->isWeakForLinker(); + return !GV->mayBeOverridden(); if (const Argument *A = dyn_cast(V)) return A->hasByValAttr(); return false;