[lldb] Only include mach headers on Darwin
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 25 Jan 2022 17:58:36 +0000 (09:58 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 25 Jan 2022 17:58:47 +0000 (09:58 -0800)
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

index 2e712cd..36ef7b5 100644 (file)
@@ -9,10 +9,6 @@
 #include "llvm/ADT/ScopeExit.h"
 #include "llvm/ADT/StringRef.h"
 
-#include <mach/mach_init.h>
-#include <mach/vm_map.h>
-#include <lldb/Host/SafeMachO.h>
-
 #include "Plugins/Process/Utility/RegisterContextDarwin_arm.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_i386.h"
@@ -60,6 +56,9 @@
 #include <TargetConditionals.h>
 // GetLLDBSharedCacheUUID() needs to call dlsym()
 #include <dlfcn.h>
+#include <mach/mach_init.h>
+#include <mach/vm_map.h>
+#include <lldb/Host/SafeMachO.h>
 #endif
 
 #ifndef __APPLE__