aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorChen Zheng <czhengsz@cn.ibm.com>2021-05-10 21:31:27 -0400
committerChen Zheng <czhengsz@cn.ibm.com>2021-05-13 21:15:06 -0400
commit61484762e9e95aa430083ceb5bd53fe0c849728e (patch)
tree0b886bc39ddc02166cb325f43a05e06e0152ae33 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentf79929aceae966f9419cfc00c275e5e60bd0ee54 (diff)
downloadllvm-61484762e9e95aa430083ceb5bd53fe0c849728e.zip
llvm-61484762e9e95aa430083ceb5bd53fe0c849728e.tar.gz
llvm-61484762e9e95aa430083ceb5bd53fe0c849728e.tar.bz2
[Debug-Info] change Tag type to dwarf::Tag for createAndAddDIE; NFC
Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D102207
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp16
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