[Lldb-commits] [lldb] r143397 - /lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp

Daniel Dunbar daniel at zuster.org
Mon Oct 31 16:38:31 PDT 2011


Author: ddunbar
Date: Mon Oct 31 18:38:30 2011
New Revision: 143397

URL: http://llvm.org/viewvc/llvm-project?rev=143397&view=rev
Log:
warnings: Fix another place with extension warnings I somehow missed.

Modified:
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp?rev=143397&r1=143396&r2=143397&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp Mon Oct 31 18:38:30 2011
@@ -17,6 +17,13 @@
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Core/Scalar.h"
 #include "lldb/Host/Endian.h"
+#include "llvm/Support/Compiler.h"
+
+// Support building against older versions of LLVM, this macro was added
+// recently.
+#ifndef LLVM_EXTENSION
+#define LLVM_EXTENSION
+#endif
 
 // Project includes
 #include "RegisterContextDarwin_i386.h"
@@ -204,9 +211,9 @@
 
 
 
-#define GPR_OFFSET(reg) (offsetof (RegisterContextDarwin_i386::GPR, reg))
-#define FPU_OFFSET(reg) (offsetof (RegisterContextDarwin_i386::FPU, reg) + sizeof (RegisterContextDarwin_i386::GPR))
-#define EXC_OFFSET(reg) (offsetof (RegisterContextDarwin_i386::EXC, reg) + sizeof (RegisterContextDarwin_i386::GPR) + sizeof (RegisterContextDarwin_i386::FPU))
+#define GPR_OFFSET(reg) (LLVM_EXTENSION offsetof (RegisterContextDarwin_i386::GPR, reg))
+#define FPU_OFFSET(reg) (LLVM_EXTENSION offsetof (RegisterContextDarwin_i386::FPU, reg) + sizeof (RegisterContextDarwin_i386::GPR))
+#define EXC_OFFSET(reg) (LLVM_EXTENSION offsetof (RegisterContextDarwin_i386::EXC, reg) + sizeof (RegisterContextDarwin_i386::GPR) + sizeof (RegisterContextDarwin_i386::FPU))
 
 // These macros will auto define the register name, alt name, register size,
 // register offset, encoding, format and native register. This ensures that





More information about the lldb-commits mailing list