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>stable-6.1
parent
b30a8c241f
commit
2c316f9af4
|
@ -18,9 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
extern "C" {
|
|
||||||
#include "disas/dis-asm.h"
|
#include "disas/dis-asm.h"
|
||||||
}
|
|
||||||
|
|
||||||
#include "vixl/a64/disasm-a64.h"
|
#include "vixl/a64/disasm-a64.h"
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
extern "C" {
|
|
||||||
#include "disas/dis-asm.h"
|
#include "disas/dis-asm.h"
|
||||||
}
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
|
@ -9,6 +9,12 @@
|
||||||
#ifndef DISAS_DIS_ASM_H
|
#ifndef DISAS_DIS_ASM_H
|
||||||
#define DISAS_DIS_ASM_H
|
#define DISAS_DIS_ASM_H
|
||||||
|
|
||||||
|
#include "qemu/bswap.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void *PTR;
|
typedef void *PTR;
|
||||||
typedef uint64_t bfd_vma;
|
typedef uint64_t bfd_vma;
|
||||||
typedef int64_t bfd_signed_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 */
|
/* from libbfd */
|
||||||
|
|
||||||
#include "qemu/bswap.h"
|
|
||||||
|
|
||||||
static inline bfd_vma bfd_getl64(const bfd_byte *addr)
|
static inline bfd_vma bfd_getl64(const bfd_byte *addr)
|
||||||
{
|
{
|
||||||
return ldq_le_p(addr);
|
return ldq_le_p(addr);
|
||||||
|
@ -508,4 +512,8 @@ static inline bfd_vma bfd_getb16(const bfd_byte *addr)
|
||||||
|
|
||||||
typedef bool bfd_boolean;
|
typedef bool bfd_boolean;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* DISAS_DIS_ASM_H */
|
#endif /* DISAS_DIS_ASM_H */
|
||||||
|
|
Loading…
Reference in New Issue