1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Silence unused variable warnings.

llvm-svn: 59841
This commit is contained in:
Devang Patel 2008-11-21 20:00:59 +00:00
parent 94c9b58408
commit a2ccbea45a
7 changed files with 14 additions and 0 deletions

View File

@ -306,8 +306,10 @@ Archive::writeSymbolTable(std::ofstream& ARFile) {
// Write the header
ARFile.write((char*)&Hdr, sizeof(Hdr));
#ifndef NDEBUG
// Save the starting position of the symbol tables data content.
unsigned startpos = ARFile.tellp();
#endif
// Write out the symbols sequentially
for ( Archive::SymTabType::iterator I = symTab.begin(), E = symTab.end();
@ -321,8 +323,10 @@ Archive::writeSymbolTable(std::ofstream& ARFile) {
ARFile.write(I->first.data(), I->first.length());
}
#ifndef NDEBUG
// Now that we're done with the symbol table, get the ending file position
unsigned endpos = ARFile.tellp();
#endif
// Make sure that the amount we wrote is what we pre-computed. This is
// critical for file integrity purposes.

View File

@ -125,6 +125,7 @@ void LiveIntervals::computeNumbering() {
I != E; ++I) {
bool inserted = mi2iMap_.insert(std::make_pair(I, MIIndex)).second;
assert(inserted && "multiple MachineInstr -> index mappings");
inserted = true;
i2miMap_.push_back(I);
MIIndex += InstrSlots::NUM;
FunctionSize++;

View File

@ -678,6 +678,7 @@ void LiveVariables::removeVirtualRegistersKilled(MachineInstr *MI) {
if (TargetRegisterInfo::isVirtualRegister(Reg)) {
bool removed = getVarInfo(Reg).removeKill(MI);
assert(removed && "kill not in register's VarInfo?");
removed = true;
}
}
}

View File

@ -152,7 +152,9 @@ bool LowerSubregsInstructionPass::LowerInsert(MachineInstr *MI) {
MI->getOperand(3).isImm() && "Invalid insert_subreg");
unsigned DstReg = MI->getOperand(0).getReg();
#ifndef NDEBUG
unsigned SrcReg = MI->getOperand(1).getReg();
#endif
unsigned InsReg = MI->getOperand(2).getReg();
unsigned SubIdx = MI->getOperand(3).getImm();

View File

@ -341,6 +341,7 @@ namespace {
UGE = UGT | EQ_BIT
};
#ifndef NDEBUG
/// validPredicate - determines whether a given value is actually a lattice
/// value. Only used in assertions or debugging.
static bool validPredicate(LatticeVal LV) {
@ -355,6 +356,7 @@ namespace {
return false;
}
}
#endif
/// reversePredicate - reverse the direction of the inequality
static LatticeVal reversePredicate(LatticeVal LV) {

View File

@ -53,6 +53,7 @@ namespace {
}
}
#ifndef DEBUG
/// PrintOps - Print out the expression identified in the Ops list.
///
static void PrintOps(Instruction *I, const std::vector<ValueEntry> &Ops) {
@ -64,6 +65,7 @@ static void PrintOps(Instruction *I, const std::vector<ValueEntry> &Ops) {
cerr << "," << Ops[i].Rank;
}
}
#endif
namespace {
class VISIBILITY_HIDDEN Reassociate : public FunctionPass {
@ -282,6 +284,7 @@ void Reassociate::LinearizeExprTree(BinaryOperator *I,
std::swap(LHS, RHS);
bool Success = !I->swapOperands();
assert(Success && "swapOperands failed");
Success = false;
MadeChange = true;
}
} else if (RHSBO) {

View File

@ -2204,6 +2204,7 @@ CastInst::getCastOpcode(
if (const VectorType *SrcPTy = dyn_cast<VectorType>(SrcTy)) {
assert(DestPTy->getBitWidth() == SrcPTy->getBitWidth() &&
"Casting vector to vector of different widths");
SrcPTy = NULL;
return BitCast; // vector -> vector
} else if (DestPTy->getBitWidth() == SrcBits) {
return BitCast; // float/int -> vector