Eliminate more pointless default statements
llvm-svn: 120446
This commit is contained in:
parent
b63ba73b1b
commit
5d02a7e553
|
@ -849,8 +849,10 @@ TypeWithKeyword::getTagTypeKindForTypeSpec(unsigned TypeSpec) {
|
||||||
case TST_struct: return TTK_Struct;
|
case TST_struct: return TTK_Struct;
|
||||||
case TST_union: return TTK_Union;
|
case TST_union: return TTK_Union;
|
||||||
case TST_enum: return TTK_Enum;
|
case TST_enum: return TTK_Enum;
|
||||||
default: llvm_unreachable("Type specifier is not a tag type kind.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llvm_unreachable("Type specifier is not a tag type kind.");
|
||||||
|
return TTK_Union;
|
||||||
}
|
}
|
||||||
|
|
||||||
ElaboratedTypeKeyword
|
ElaboratedTypeKeyword
|
||||||
|
@ -896,7 +898,6 @@ TypeWithKeyword::KeywordIsTagTypeKind(ElaboratedTypeKeyword Keyword) {
|
||||||
const char*
|
const char*
|
||||||
TypeWithKeyword::getKeywordName(ElaboratedTypeKeyword Keyword) {
|
TypeWithKeyword::getKeywordName(ElaboratedTypeKeyword Keyword) {
|
||||||
switch (Keyword) {
|
switch (Keyword) {
|
||||||
default: llvm_unreachable("Unknown elaborated type keyword.");
|
|
||||||
case ETK_None: return "";
|
case ETK_None: return "";
|
||||||
case ETK_Typename: return "typename";
|
case ETK_Typename: return "typename";
|
||||||
case ETK_Class: return "class";
|
case ETK_Class: return "class";
|
||||||
|
@ -904,6 +905,9 @@ TypeWithKeyword::getKeywordName(ElaboratedTypeKeyword Keyword) {
|
||||||
case ETK_Union: return "union";
|
case ETK_Union: return "union";
|
||||||
case ETK_Enum: return "enum";
|
case ETK_Enum: return "enum";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llvm_unreachable("Unknown elaborated type keyword.");
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
ElaboratedType::~ElaboratedType() {}
|
ElaboratedType::~ElaboratedType() {}
|
||||||
|
@ -956,11 +960,13 @@ bool Type::isElaboratedTypeSpecifier() const {
|
||||||
|
|
||||||
const char *Type::getTypeClassName() const {
|
const char *Type::getTypeClassName() const {
|
||||||
switch (TypeBits.TC) {
|
switch (TypeBits.TC) {
|
||||||
default: assert(0 && "Type class not in TypeNodes.def!");
|
|
||||||
#define ABSTRACT_TYPE(Derived, Base)
|
#define ABSTRACT_TYPE(Derived, Base)
|
||||||
#define TYPE(Derived, Base) case Derived: return #Derived;
|
#define TYPE(Derived, Base) case Derived: return #Derived;
|
||||||
#include "clang/AST/TypeNodes.def"
|
#include "clang/AST/TypeNodes.def"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llvm_unreachable("Invalid type class.");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *BuiltinType::getName(const LangOptions &LO) const {
|
const char *BuiltinType::getName(const LangOptions &LO) const {
|
||||||
|
@ -995,6 +1001,7 @@ const char *BuiltinType::getName(const LangOptions &LO) const {
|
||||||
case ObjCClass: return "Class";
|
case ObjCClass: return "Class";
|
||||||
case ObjCSel: return "SEL";
|
case ObjCSel: return "SEL";
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm_unreachable("Invalid builtin type.");
|
llvm_unreachable("Invalid builtin type.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1019,8 +1026,9 @@ QualType QualType::getNonLValueExprType(ASTContext &Context) const {
|
||||||
|
|
||||||
llvm::StringRef FunctionType::getNameForCallConv(CallingConv CC) {
|
llvm::StringRef FunctionType::getNameForCallConv(CallingConv CC) {
|
||||||
switch (CC) {
|
switch (CC) {
|
||||||
case CC_Default: llvm_unreachable("no name for default cc");
|
case CC_Default:
|
||||||
default: return "";
|
llvm_unreachable("no name for default cc");
|
||||||
|
return "";
|
||||||
|
|
||||||
case CC_C: return "cdecl";
|
case CC_C: return "cdecl";
|
||||||
case CC_X86StdCall: return "stdcall";
|
case CC_X86StdCall: return "stdcall";
|
||||||
|
@ -1028,6 +1036,9 @@ llvm::StringRef FunctionType::getNameForCallConv(CallingConv CC) {
|
||||||
case CC_X86ThisCall: return "thiscall";
|
case CC_X86ThisCall: return "thiscall";
|
||||||
case CC_X86Pascal: return "pascal";
|
case CC_X86Pascal: return "pascal";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llvm_unreachable("Invalid calling convention.");
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
FunctionProtoType::FunctionProtoType(QualType Result, const QualType *ArgArray,
|
FunctionProtoType::FunctionProtoType(QualType Result, const QualType *ArgArray,
|
||||||
|
|
Loading…
Reference in New Issue