Skip to content

Commit

Permalink
fix a few more
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Nov 10, 2024
1 parent 920bb23 commit 6a49a29
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10835,6 +10835,7 @@ Sema::FormatStringType Sema::GetFormatStringType(const FormatAttr *Format) {
.Case("strfmon", FST_Strfmon)
.Cases("kprintf", "cmn_err", "vcmn_err", "zcmn_err", FST_Kprintf)
.Case("freebsd_kprintf", FST_FreeBSDKPrintf)
.Case("midnightbsd_kprintf", FST_FreeBSDKPrintf)
.Case("os_trace", FST_OSLog)
.Case("os_log", FST_OSLog)
.Default(FST_Unknown);
Expand Down
1 change: 1 addition & 0 deletions contrib/llvm-project/clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3868,6 +3868,7 @@ static FormatAttrKind getFormatAttrKind(StringRef Format) {
.Cases("cmn_err", "vcmn_err", "zcmn_err", SupportedFormat)
.Case("kprintf", SupportedFormat) // OpenBSD.
.Case("freebsd_kprintf", SupportedFormat) // FreeBSD.
.Case("midnightbsd_kprintf", SupportedFormat) // FreeBSD.
.Case("os_trace", SupportedFormat)
.Case("os_log", SupportedFormat)

Expand Down
2 changes: 1 addition & 1 deletion contrib/llvm-project/lldb/include/lldb/Host/HostInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "lldb/Host/linux/HostInfoLinux.h"
#define HOST_INFO_TYPE HostInfoLinux
#endif
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__MidnightBSD__)
#include "lldb/Host/freebsd/HostInfoFreeBSD.h"
#define HOST_INFO_TYPE HostInfoFreeBSD
#elif defined(__NetBSD__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef ADDRESS_FAMILY sa_family_t;
#include <sys/socket.h>
#endif

#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
#include <sys/types.h>
#endif

Expand Down
4 changes: 2 additions & 2 deletions contrib/llvm-project/lldb/source/Host/common/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

#if defined(__linux__) || defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || defined(__APPLE__) || \
defined(__NetBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
defined(__NetBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) || defined(__MidnightBSD__)
#if !defined(__ANDROID__)
#include <spawn.h>
#endif
#include <sys/syscall.h>
#include <sys/wait.h>
#endif

#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
#include <pthread_np.h>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Status HostThreadPosix::Join(lldb::thread_result_t *result) {
Status HostThreadPosix::Cancel() {
Status error;
if (IsJoinable()) {
#ifndef __FreeBSD__
#if !defined(__FreeBSD__) && !defined(__MidnightBSD__)
llvm_unreachable("someone is calling HostThread::Cancel()");
#else
int err = ::pthread_cancel(m_thread);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PlatformSP PlatformFreeBSD::CreateInstance(bool force, const ArchSpec *arch) {
create = true;
break;

#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
// Only accept "unknown" for the OS if the host is BSD and it "unknown"
// wasn't specified (it was just returned because it was NOT specified)
case llvm::Triple::OSType::UnknownOS:
Expand Down Expand Up @@ -87,7 +87,7 @@ void PlatformFreeBSD::Initialize() {
Platform::Initialize();

if (g_initialize_count++ == 0) {
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
PlatformSP default_platform_sp(new PlatformFreeBSD(true));
default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
Platform::SetHostPlatform(default_platform_sp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#if defined(__linux__)
#include "Plugins/Process/Linux/NativeProcessLinux.h"
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__MidnightBSD__)
#include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h"
#elif defined(__NetBSD__)
#include "Plugins/Process/NetBSD/NativeProcessNetBSD.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define ITT_OS ITT_OS_WIN
#elif defined(__APPLE__) && defined(__MACH__)
#define ITT_OS ITT_OS_MAC
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__MidnightBSD__)
#define ITT_OS ITT_OS_FREEBSD
#else
#define ITT_OS ITT_OS_LINUX
Expand Down

0 comments on commit 6a49a29

Please sign in to comment.