[Lldb-commits] [lldb] a0793cb - Update SafeMachO.h to #undefine more names

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 23 23:36:16 PDT 2021


Author: Jason Molenda
Date: 2021-03-23T23:34:22-07:00
New Revision: a0793cb1f1a64f61675767d551bbd26ea41a4e93

URL: https://github.com/llvm/llvm-project/commit/a0793cb1f1a64f61675767d551bbd26ea41a4e93
DIFF: https://github.com/llvm/llvm-project/commit/a0793cb1f1a64f61675767d551bbd26ea41a4e93.diff

LOG: Update SafeMachO.h to #undefine more names

Depending on include order, these can cause build errors when
including the llvm MachO.h where these are defined as enums.
Update the list to include some more names.

Added: 
    

Modified: 
    lldb/include/lldb/Host/SafeMachO.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Host/SafeMachO.h b/lldb/include/lldb/Host/SafeMachO.h
index d7c376d23a4a..0540383b8c52 100644
--- a/lldb/include/lldb/Host/SafeMachO.h
+++ b/lldb/include/lldb/Host/SafeMachO.h
@@ -23,6 +23,7 @@
 
 #undef CPU_ARCH_MASK
 #undef CPU_ARCH_ABI64
+#undef CPU_ARCH_ABI64_32
 
 #undef CPU_TYPE_ANY
 #undef CPU_TYPE_X86
@@ -31,12 +32,13 @@
 #undef CPU_TYPE_MC98000
 #undef CPU_TYPE_ARM
 #undef CPU_TYPE_ARM64
+#undef CPU_TYPE_ARM64_32
 #undef CPU_TYPE_SPARC
 #undef CPU_TYPE_POWERPC
 #undef CPU_TYPE_POWERPC64
 
-#undef CPU_SUB_TYPE_MASK
-#undef CPU_SUB_TYPE_LIB64
+#undef CPU_SUBTYPE_MASK
+#undef CPU_SUBTYPE_LIB64
 
 #undef CPU_SUBTYPE_MULTIPLE
 
@@ -88,6 +90,9 @@
 #undef CPU_SUBTYPE_ARM_V7M
 #undef CPU_SUBTYPE_ARM_V7EM
 
+#undef CPU_SUBTYPE_ARM64E
+#undef CPU_SUBTYPE_ARM64_32_V8
+#undef CPU_SUBTYPE_ARM64_V8
 #undef CPU_SUBTYPE_ARM64_ALL
 
 #undef CPU_SUBTYPE_SPARC_ALL
@@ -110,6 +115,47 @@
 #undef CPU_SUBTYPE_MC980000_ALL
 #undef CPU_SUBTYPE_MC98601
 
+#undef VM_PROT_READ
+#undef VM_PROT_WRITE
+#undef VM_PROT_EXECUTE
+
+#undef ARM_DEBUG_STATE
+#undef ARM_EXCEPTION_STATE
+#undef ARM_EXCEPTION_STATE64
+#undef ARM_EXCEPTION_STATE64_COUNT
+#undef ARM_THREAD_STATE
+#undef ARM_THREAD_STATE64
+#undef ARM_THREAD_STATE64_COUNT
+#undef ARM_THREAD_STATE_COUNT
+#undef ARM_VFP_STATE
+#undef ARN_THREAD_STATE_NONE
+#undef PPC_EXCEPTION_STATE
+#undef PPC_EXCEPTION_STATE64
+#undef PPC_FLOAT_STATE
+#undef PPC_THREAD_STATE
+#undef PPC_THREAD_STATE64
+#undef PPC_THREAD_STATE_NONE
+#undef PPC_VECTOR_STATE
+#undef x86_DEBUG_STATE
+#undef x86_DEBUG_STATE32
+#undef x86_DEBUG_STATE64
+#undef x86_EXCEPTION_STATE
+#undef x86_EXCEPTION_STATE32
+#undef x86_EXCEPTION_STATE64
+#undef x86_EXCEPTION_STATE64_COUNT
+#undef x86_EXCEPTION_STATE_COUNT
+#undef x86_FLOAT_STATE
+#undef x86_FLOAT_STATE32
+#undef x86_FLOAT_STATE64
+#undef x86_FLOAT_STATE64_COUNT
+#undef x86_FLOAT_STATE_COUNT
+#undef x86_THREAD_STATE
+#undef x86_THREAD_STATE32
+#undef x86_THREAD_STATE32_COUNT
+#undef x86_THREAD_STATE64
+#undef x86_THREAD_STATE64_COUNT
+#undef x86_THREAD_STATE_COUNT
+
 #include "llvm/BinaryFormat/MachO.h"
 
 #endif // LLDB_HOST_SAFEMACHO_H


        


More information about the lldb-commits mailing list