diff --git a/llvm/lib/Target/TargetMachineC.cpp b/llvm/lib/Target/TargetMachineC.cpp index f6ed26be575595..80024f9a6d5df5 100644 --- a/llvm/lib/Target/TargetMachineC.cpp +++ b/llvm/lib/Target/TargetMachineC.cpp @@ -262,7 +262,7 @@ void LLVMSetTargetMachineGlobalISel(LLVMTargetMachineRef T, LLVMBool Enable) { void LLVMSetTargetMachineGlobalISelAbort(LLVMTargetMachineRef T, LLVMGlobalISelAbortMode Mode) { - GlobalISelAbortMode AM; + GlobalISelAbortMode AM = GlobalISelAbortMode::Enable; switch (Mode) { case LLVMGlobalISelAbortDisable: AM = GlobalISelAbortMode::Disable; @@ -273,9 +273,6 @@ void LLVMSetTargetMachineGlobalISelAbort(LLVMTargetMachineRef T, case LLVMGlobalISelAbortDisableWithDiag: AM = GlobalISelAbortMode::DisableWithDiag; break; - default: - AM = GlobalISelAbortMode::Enable; - break; } unwrap(T)->setGlobalISelAbort(AM);