summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-10-31 22:51:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-10-31 22:51:05 +0000
commit12a199040c0cf8a274376a872aa32cd12e234e2c (patch)
tree8dafd708753b6b01c6484e1c07124b07e38725fb /lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
parent0d23d03b7c48a07eedb7453e5e6911f2f1a00425 (diff)
downloadbcm5719-llvm-12a199040c0cf8a274376a872aa32cd12e234e2c.tar.gz
bcm5719-llvm-12a199040c0cf8a274376a872aa32cd12e234e2c.zip
warnings: Use LLVM_EXTENSION to suppress a bunch of pedantic warnings.
llvm-svn: 143387
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
index 99341ac1142..52cb00f0e03 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
@@ -23,6 +23,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 "ARM_GCC_Registers.h"
@@ -184,7 +191,7 @@ RegisterContextDarwin_arm::~RegisterContextDarwin_arm()
#define GPR_OFFSET(idx) ((idx) * 4)
#define FPU_OFFSET(idx) ((idx) * 4 + sizeof (RegisterContextDarwin_arm::GPR))
#define EXC_OFFSET(idx) ((idx) * 4 + sizeof (RegisterContextDarwin_arm::GPR) + sizeof (RegisterContextDarwin_arm::FPU))
-#define DBG_OFFSET(reg) (offsetof (RegisterContextDarwin_arm::DBG, reg) + sizeof (RegisterContextDarwin_arm::GPR) + sizeof (RegisterContextDarwin_arm::FPU) + sizeof (RegisterContextDarwin_arm::EXC))
+#define DBG_OFFSET(reg) ((LLVM_EXTENSION offsetof (RegisterContextDarwin_arm::DBG, reg) + sizeof (RegisterContextDarwin_arm::GPR) + sizeof (RegisterContextDarwin_arm::FPU) + sizeof (RegisterContextDarwin_arm::EXC)))
#define DEFINE_DBG(reg, i) #reg, NULL, sizeof(((RegisterContextDarwin_arm::DBG *)NULL)->reg[i]), DBG_OFFSET(reg[i]), eEncodingUint, eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, dbg_##reg##i }
#define REG_CONTEXT_SIZE (sizeof (RegisterContextDarwin_arm::GPR) + sizeof (RegisterContextDarwin_arm::FPU) + sizeof (RegisterContextDarwin_arm::EXC))
OpenPOWER on IntegriCloud