From 3ed469ccd7b028a030b550d84b7336d146f5d8fa Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 2 Nov 2006 20:25:50 +0000 Subject: For PR786: Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/SimplifyLibCalls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Transforms/IPO/SimplifyLibCalls.cpp') diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index 157ea384b7..af117094d6 100644 --- a/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -1106,7 +1106,7 @@ struct LLVMMemCpyMoveOptzn : public LibCallOptimization { CastInst* DestCast = new CastInst(dest,PointerType::get(castType),dest->getName()+".cast",ci); LoadInst* LI = new LoadInst(SrcCast,SrcCast->getName()+".val",ci); - StoreInst* SI = new StoreInst(LI, DestCast, ci); + new StoreInst(LI, DestCast, ci); ci->eraseFromParent(); return true; } @@ -2063,7 +2063,7 @@ bool getConstantStringLength(Value *V, uint64_t &len, ConstantArray **CA) { Constant* INTLZR = GV->getInitializer(); // Handle the ConstantAggregateZero case - if (ConstantAggregateZero *CAZ = dyn_cast(INTLZR)) { + if (isa(INTLZR)) { // This is a degenerate case. The initializer is constant zero so the // length of the string must be zero. len = 0; -- cgit v1.2.3-70-g09d2