Commit f2e93b66 by JF Bastien

Fix build warnings

The following CL enables -Werror: https://codereview.chromium.org/863093002/ There were two warnings left in our subzero build: - Dead default cases because all of an enum's values were handled by the switch. - Use of C99 VLA. R=stichnot@chromium.org TEST= make check BUG= none Review URL: https://codereview.chromium.org/862853003
parent 819d7b56
......@@ -304,14 +304,15 @@ void CfgNode::advancedPhiLowering() {
return;
// Count the number of non-deleted Phi instructions.
struct {
struct PhiDesc {
InstPhi *Phi;
Variable *Dest;
Operand *Src;
bool Processed;
size_t NumPred; // number of entries whose Src is this Dest
int32_t Weight; // preference for topological order
} Desc[getPhis().size()];
};
llvm::SmallVector<PhiDesc, 32> Desc(getPhis().size());
size_t NumPhis = 0;
for (Inst &I : Phis) {
......
......@@ -589,9 +589,6 @@ private:
const Ice::Intrinsics::FullIntrinsicInfo *I) {
Ice::SizeT ArgIndex = 0;
switch (I->validateCall(Call, ArgIndex)) {
default:
report_fatal_error("Unknown validation error for intrinsic call");
break;
case Ice::Intrinsics::IsValidCall:
break;
case Ice::Intrinsics::BadReturnType: {
......
......@@ -2906,9 +2906,6 @@ void VariableSplit::dump(const Cfg *Func, Ostream &Str) const {
case High:
Str << "high";
break;
default:
Str << "???";
break;
}
Str << "(";
if (Func)
......
......@@ -108,9 +108,6 @@ public:
case Opt_2:
translateO2();
break;
default:
Func->setError("Target doesn't specify lowering steps.");
break;
}
}
virtual void translateOm1() {
......
......@@ -4710,14 +4710,6 @@ void TargetGlobalInitX8632::lower(const VariableDeclaration &Var) {
Str << "\n";
break;
}
default: {
std::string Buffer;
llvm::raw_string_ostream StrBuf(Buffer);
StrBuf << "Unable to lower initializer: ";
Init->dump(StrBuf);
llvm::report_fatal_error(StrBuf.str());
break;
}
}
}
} else if (IsConstant || IsExternal)
......
......@@ -100,9 +100,6 @@ Ice::Ostream &operator<<(Ice::Ostream &Stream, ExtendedType::TypeKind Kind) {
case ExtendedType::FuncSig:
Stream << "FuncSig";
break;
default:
Stream << "??";
break;
}
return Stream;
}
......@@ -1434,9 +1431,6 @@ private:
if (!ALLOW_DUMP)
return;
switch (Value) {
default:
report_fatal_error("Unknown VectorIndexCheckValue");
break;
case VectorIndexNotVector:
Stream << "Vector index on non vector";
break;
......@@ -2489,10 +2483,6 @@ void FunctionParser::ProcessRecord() {
if (IntrinsicInfo) {
Ice::SizeT ArgIndex = 0;
switch (IntrinsicInfo->validateCall(Inst, ArgIndex)) {
default:
Error("Unknown validation error for intrinsic call");
// TODO(kschimpf) Remove error recovery once implementation complete.
break;
case Ice::Intrinsics::IsValidCall:
break;
case Ice::Intrinsics::BadReturnType: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment