diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index b3f1b95..cbfdd04 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -273,9 +273,9 @@ static StringRef getPrettyScopeName(const DIScope *Scope) { return "<unnamed-tag>"; case dwarf::DW_TAG_namespace: return "`anonymous namespace'"; + default: + return StringRef(); } - - return StringRef(); } const DISubprogram *CodeViewDebug::collectParentScopeNames( @@ -1487,6 +1487,9 @@ static bool shouldEmitUdt(const DIType *T) { case dwarf::DW_TAG_class_type: case dwarf::DW_TAG_union_type: return false; + default: + // do nothing. + ; } } } @@ -2032,10 +2035,13 @@ static MethodKind translateMethodKindFlags(const DISubprogram *SP, static TypeRecordKind getRecordKind(const DICompositeType *Ty) { switch (Ty->getTag()) { - case dwarf::DW_TAG_class_type: return TypeRecordKind::Class; - case dwarf::DW_TAG_structure_type: return TypeRecordKind::Struct; + case dwarf::DW_TAG_class_type: + return TypeRecordKind::Class; + case dwarf::DW_TAG_structure_type: + return TypeRecordKind::Struct; + default: + llvm_unreachable("unexpected tag"); } - llvm_unreachable("unexpected tag"); } /// Return ClassOptions that should be present on both the forward declaration |