Silence gcc warning "control reaches end of non-void function" [NFCI]
Without this fix gcc (7.4) complains with
/data/repo/master/clang/lib/CodeGen/CGObjCMac.cpp: In member function 'std::__cxx11::string {anonymous}::CGObjCCommonMac::GetSectionName(llvm::StringRef, llvm::StringRef)':
/data/repo/master/clang/lib/CodeGen/CGObjCMac.cpp:4944:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
All values in the ObjectFormatType enum are currently handled in the switch
but gcc complains anyway.
llvm-svn: 365174
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 37b9b40..12880fe 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -4941,6 +4941,8 @@
llvm::report_fatal_error(
"Objective-C support is unimplemented for object file format.");
}
+
+ llvm_unreachable("Unhandled llvm::Triple::ObjectFormatType enum");
}
/// EmitImageInfo - Emit the image info marker used to encode some module