[llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp
Chris Lattner
sabre at nondot.org
Wed Jan 31 20:59:53 PST 2007
Changes in directory llvm/lib/VMCore:
Instructions.cpp updated: 1.69 -> 1.70
---
Log message:
silence some warnings when assertions are disabled.
---
Diffs of the changes: (+8 -2)
Instructions.cpp | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.69 llvm/lib/VMCore/Instructions.cpp:1.70
--- llvm/lib/VMCore/Instructions.cpp:1.69 Wed Jan 31 16:30:26 2007
+++ llvm/lib/VMCore/Instructions.cpp Wed Jan 31 22:59:37 2007
@@ -203,6 +203,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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
More information about the llvm-commits
mailing list