diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-01 04:59:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-01 04:59:37 +0000 |
commit | 2e21fce987d9880803d2e6bbd625496cb0e97ae9 (patch) | |
tree | 41d9adf309f17056c35cfa58003ba4fe5e44af6b /lib/VMCore/Instructions.cpp | |
parent | acf8145b62f7ee685ad48c4e12a97c1c13aa333f (diff) | |
download | external_llvm-2e21fce987d9880803d2e6bbd625496cb0e97ae9.zip external_llvm-2e21fce987d9880803d2e6bbd625496cb0e97ae9.tar.gz external_llvm-2e21fce987d9880803d2e6bbd625496cb0e97ae9.tar.bz2 |
silence some warnings when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 39eebe6..b4452c7 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -203,6 +203,7 @@ void CallInst::init(Value *Func, const std::vector<Value*> &Params) { const FunctionType *FTy = cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType()); + FTy = FTy; // silence warning. assert((Params.size() == FTy->getNumParams() || (FTy->isVarArg() && Params.size() > FTy->getNumParams())) && @@ -224,6 +225,7 @@ void CallInst::init(Value *Func, Value *Actual1, Value *Actual2) { const FunctionType *FTy = cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType()); + FTy = FTy; // silence warning. assert((FTy->getNumParams() == 2 || (FTy->isVarArg() && FTy->getNumParams() < 2)) && @@ -244,6 +246,7 @@ void CallInst::init(Value *Func, Value *Actual) { const FunctionType *FTy = cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType()); + FTy = FTy; // silence warning. assert((FTy->getNumParams() == 1 || (FTy->isVarArg() && FTy->getNumParams() == 0)) && @@ -258,10 +261,11 @@ void CallInst::init(Value *Func) { Use *OL = OperandList = new Use[1]; OL[0].init(Func, this); - const FunctionType *MTy = + const FunctionType *FTy = cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType()); + FTy = FTy; // silence warning. - assert(MTy->getNumParams() == 0 && "Calling a function with bad signature"); + assert(FTy->getNumParams() == 0 && "Calling a function with bad signature"); } CallInst::CallInst(Value *Func, const std::vector<Value*> &Params, @@ -356,6 +360,7 @@ void InvokeInst::init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException, OL[2].init(IfException, this); const FunctionType *FTy = cast<FunctionType>(cast<PointerType>(Fn->getType())->getElementType()); + FTy = FTy; // silence warning. assert((Params.size() == FTy->getNumParams()) || (FTy->isVarArg() && Params.size() > FTy->getNumParams()) && @@ -1040,6 +1045,7 @@ bool ShuffleVectorInst::isValidOperands(const Value *V1, const Value *V2, void BinaryOperator::init(BinaryOps iType) { Value *LHS = getOperand(0), *RHS = getOperand(1); + LHS = LHS; RHS = RHS; // Silence warnings. assert(LHS->getType() == RHS->getType() && "Binary operator operand types must match!"); #ifndef NDEBUG |