Skip to content

Commit ad1b7a4

Browse files
committed
Fix a warning: default label in switch which covers all enumeration values (NFC)
1 parent 5a71f7a commit ad1b7a4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Target/TargetMachineC.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void LLVMSetTargetMachineGlobalISel(LLVMTargetMachineRef T, LLVMBool Enable) {
262262

263263
void LLVMSetTargetMachineGlobalISelAbort(LLVMTargetMachineRef T,
264264
LLVMGlobalISelAbortMode Mode) {
265-
GlobalISelAbortMode AM;
265+
GlobalISelAbortMode AM = GlobalISelAbortMode::Enable;
266266
switch (Mode) {
267267
case LLVMGlobalISelAbortDisable:
268268
AM = GlobalISelAbortMode::Disable;
@@ -273,9 +273,6 @@ void LLVMSetTargetMachineGlobalISelAbort(LLVMTargetMachineRef T,
273273
case LLVMGlobalISelAbortDisableWithDiag:
274274
AM = GlobalISelAbortMode::DisableWithDiag;
275275
break;
276-
default:
277-
AM = GlobalISelAbortMode::Enable;
278-
break;
279276
}
280277

281278
unwrap(T)->setGlobalISelAbort(AM);

0 commit comments

Comments
 (0)