diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-04-16 14:55:43 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-05-10 17:21:54 +0100 |
commit | 2c316f9af4752369ac86be85cd8846d6365e4e68 (patch) | |
tree | d6e72d66eec94aaea2d6bd4e413ab107bf638025 /include/disas | |
parent | b30a8c241fe22b9cbd0ad015809fc92688fee4ff (diff) | |
download | qemu-2c316f9af4752369ac86be85cd8846d6365e4e68.zip qemu-2c316f9af4752369ac86be85cd8846d6365e4e68.tar.gz qemu-2c316f9af4752369ac86be85cd8846d6365e4e68.tar.bz2 |
include/disas/dis-asm.h: Handle being included outside 'extern "C"'
Make dis-asm.h handle being included outside an 'extern "C"' block;
this allows us to remove the 'extern "C"' blocks that our two C++
files that include it are using.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/disas')
-rw-r--r-- | include/disas/dis-asm.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h index 13fa1ed..4701445 100644 --- a/include/disas/dis-asm.h +++ b/include/disas/dis-asm.h @@ -9,6 +9,12 @@ #ifndef DISAS_DIS_ASM_H #define DISAS_DIS_ASM_H +#include "qemu/bswap.h" + +#ifdef __cplusplus +extern "C" { +#endif + typedef void *PTR; typedef uint64_t bfd_vma; typedef int64_t bfd_signed_vma; @@ -479,8 +485,6 @@ bool cap_disas_plugin(disassemble_info *info, uint64_t pc, size_t size); /* from libbfd */ -#include "qemu/bswap.h" - static inline bfd_vma bfd_getl64(const bfd_byte *addr) { return ldq_le_p(addr); @@ -508,4 +512,8 @@ static inline bfd_vma bfd_getb16(const bfd_byte *addr) typedef bool bfd_boolean; +#ifdef __cplusplus +} +#endif + #endif /* DISAS_DIS_ASM_H */ |