@@ -63,31 +63,28 @@ void DbgRecord::deleteRecord() {
63
63
switch (RecordKind) {
64
64
case ValueKind:
65
65
delete cast<DPValue>(this );
66
- break ;
67
- default :
68
- llvm_unreachable (" unsupported DbgRecord kind" );
66
+ return ;
69
67
}
68
+ llvm_unreachable (" unsupported DbgRecord kind" );
70
69
}
71
70
72
71
void DbgRecord::print (raw_ostream &O, bool IsForDebug) const {
73
72
switch (RecordKind) {
74
73
case ValueKind:
75
74
cast<DPValue>(this )->print (O, IsForDebug);
76
- break ;
77
- default :
78
- llvm_unreachable (" unsupported DbgRecord kind" );
75
+ return ;
79
76
};
77
+ llvm_unreachable (" unsupported DbgRecord kind" );
80
78
}
81
79
82
80
void DbgRecord::print (raw_ostream &O, ModuleSlotTracker &MST,
83
81
bool IsForDebug) const {
84
82
switch (RecordKind) {
85
83
case ValueKind:
86
84
cast<DPValue>(this )->print (O, MST, IsForDebug);
87
- break ;
88
- default :
89
- llvm_unreachable (" unsupported DbgRecord kind" );
85
+ return ;
90
86
};
87
+ llvm_unreachable (" unsupported DbgRecord kind" );
91
88
}
92
89
93
90
bool DbgRecord::isIdenticalToWhenDefined (const DbgRecord &R) const {
@@ -96,10 +93,8 @@ bool DbgRecord::isIdenticalToWhenDefined(const DbgRecord &R) const {
96
93
switch (RecordKind) {
97
94
case ValueKind:
98
95
return cast<DPValue>(this )->isIdenticalToWhenDefined (*cast<DPValue>(&R));
99
- break ;
100
- default :
101
- llvm_unreachable (" unsupported DbgRecord kind" );
102
96
};
97
+ llvm_unreachable (" unsupported DbgRecord kind" );
103
98
}
104
99
105
100
bool DbgRecord::isEquivalentTo (const DbgRecord &R) const {
@@ -108,10 +103,8 @@ bool DbgRecord::isEquivalentTo(const DbgRecord &R) const {
108
103
switch (RecordKind) {
109
104
case ValueKind:
110
105
return cast<DPValue>(this )->isEquivalentTo (*cast<DPValue>(&R));
111
- break ;
112
- default :
113
- llvm_unreachable (" unsupported DbgRecord kind" );
114
106
};
107
+ llvm_unreachable (" unsupported DbgRecord kind" );
115
108
}
116
109
117
110
DPValue *DPValue::createDPValue (Value *Location, DILocalVariable *DV,
@@ -314,9 +307,8 @@ DbgRecord *DbgRecord::clone() const {
314
307
switch (RecordKind) {
315
308
case ValueKind:
316
309
return cast<DPValue>(this )->clone ();
317
- default :
318
- llvm_unreachable (" unsupported DbgRecord kind" );
319
310
};
311
+ llvm_unreachable (" unsupported DbgRecord kind" );
320
312
}
321
313
322
314
DPValue *DPValue::clone () const { return new DPValue (*this ); }
0 commit comments