[llvm] r196635 - Remove unused value.
Rafael Espindola
rafael.espindola at gmail.com
Fri Dec 6 18:27:52 PST 2013
Author: rafael
Date: Fri Dec 6 20:27:52 2013
New Revision: 196635
URL: http://llvm.org/viewvc/llvm-project?rev=196635&view=rev
Log:
Remove unused value.
Modified:
llvm/trunk/include/llvm/IR/Type.h
llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/trunk/lib/IR/AsmWriter.cpp
llvm/trunk/lib/IR/Core.cpp
Modified: llvm/trunk/include/llvm/IR/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Type.h?rev=196635&r1=196634&r2=196635&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Type.h (original)
+++ llvm/trunk/include/llvm/IR/Type.h Fri Dec 6 20:27:52 2013
@@ -73,7 +73,6 @@ public:
PointerTyID, ///< 14: Pointers
VectorTyID, ///< 15: SIMD 'packed' format, or other vector type
- NumTypeIDs, // Must remain as last defined ID
LastPrimitiveTyID = X86_MMXTyID,
FirstDerivedTyID = IntegerTyID
};
Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=196635&r1=196634&r2=196635&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Fri Dec 6 20:27:52 2013
@@ -382,7 +382,6 @@ static void WriteTypeTable(const ValueEn
unsigned Code = 0;
switch (T->getTypeID()) {
- default: llvm_unreachable("Unknown type!");
case Type::VoidTyID: Code = bitc::TYPE_CODE_VOID; break;
case Type::HalfTyID: Code = bitc::TYPE_CODE_HALF; break;
case Type::FloatTyID: Code = bitc::TYPE_CODE_FLOAT; break;
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=196635&r1=196634&r2=196635&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Fri Dec 6 20:27:52 2013
@@ -192,16 +192,16 @@ void TypePrinting::incorporateTypes(cons
/// use of type names or up references to shorten the type name where possible.
void TypePrinting::print(Type *Ty, raw_ostream &OS) {
switch (Ty->getTypeID()) {
- case Type::VoidTyID: OS << "void"; break;
- case Type::HalfTyID: OS << "half"; break;
- case Type::FloatTyID: OS << "float"; break;
- case Type::DoubleTyID: OS << "double"; break;
- case Type::X86_FP80TyID: OS << "x86_fp80"; break;
- case Type::FP128TyID: OS << "fp128"; break;
- case Type::PPC_FP128TyID: OS << "ppc_fp128"; break;
- case Type::LabelTyID: OS << "label"; break;
- case Type::MetadataTyID: OS << "metadata"; break;
- case Type::X86_MMXTyID: OS << "x86_mmx"; break;
+ case Type::VoidTyID: OS << "void"; return;
+ case Type::HalfTyID: OS << "half"; return;
+ case Type::FloatTyID: OS << "float"; return;
+ case Type::DoubleTyID: OS << "double"; return;
+ case Type::X86_FP80TyID: OS << "x86_fp80"; return;
+ case Type::FP128TyID: OS << "fp128"; return;
+ case Type::PPC_FP128TyID: OS << "ppc_fp128"; return;
+ case Type::LabelTyID: OS << "label"; return;
+ case Type::MetadataTyID: OS << "metadata"; return;
+ case Type::X86_MMXTyID: OS << "x86_mmx"; return;
case Type::IntegerTyID:
OS << 'i' << cast<IntegerType>(Ty)->getBitWidth();
return;
@@ -261,10 +261,8 @@ void TypePrinting::print(Type *Ty, raw_o
OS << '>';
return;
}
- default:
- OS << "<unrecognized-type>";
- return;
}
+ llvm_unreachable("Invalid TypeID");
}
void TypePrinting::printStructBody(StructType *STy, raw_ostream &OS) {
Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=196635&r1=196634&r2=196635&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Fri Dec 6 20:27:52 2013
@@ -175,7 +175,6 @@ LLVMContextRef LLVMGetModuleContext(LLVM
LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) {
switch (unwrap(Ty)->getTypeID()) {
- default: llvm_unreachable("Unhandled TypeID.");
case Type::VoidTyID:
return LLVMVoidTypeKind;
case Type::HalfTyID:
@@ -209,6 +208,7 @@ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef
case Type::X86_MMXTyID:
return LLVMX86_MMXTypeKind;
}
+ llvm_unreachable("Unhandled TypeID.");
}
LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty)
More information about the llvm-commits
mailing list