From 566b097b851dc398c3f7d9372abd04353dd5e455 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 7 Mar 2018 12:32:39 -0500 Subject: [PATCH] Eliminate qapi/qmp/types.h qapi/qmp/types.h is a convenience header to include a number of qapi/qmp/ headers. Since we rarely need all of the headers qapi/qmp/types.h includes, we bypass it most of the time. Most of the places that use it don't need all the headers, either. Include the necessary headers directly, and drop qapi/qmp/types.h. Backports commit 6b67395762a4c8b6ca94364e0a0f616a6470c46a from qemu --- msvc/unicorn/unicorn/unicorn.vcxproj | 4 +--- msvc/unicorn/unicorn/unicorn.vcxproj.filters | 14 ++++------- .../unicorn_static/unicorn_static.vcxproj | 1 - .../unicorn_static.vcxproj.filters | 12 +++------- qemu/include/qapi/qmp/types.h | 24 ------------------- qemu/qapi/qapi-dealloc-visitor.c | 1 - qemu/qapi/qobject-input-visitor.c | 5 +++- qemu/qapi/qobject-output-visitor.c | 5 +++- 8 files changed, 16 insertions(+), 50 deletions(-) delete mode 100644 qemu/include/qapi/qmp/types.h diff --git a/msvc/unicorn/unicorn/unicorn.vcxproj b/msvc/unicorn/unicorn/unicorn.vcxproj index 0c877d77..e52a09d8 100644 --- a/msvc/unicorn/unicorn/unicorn.vcxproj +++ b/msvc/unicorn/unicorn/unicorn.vcxproj @@ -321,13 +321,11 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\ - - + - diff --git a/msvc/unicorn/unicorn/unicorn.vcxproj.filters b/msvc/unicorn/unicorn/unicorn.vcxproj.filters index f9f5fca3..6f250ed4 100644 --- a/msvc/unicorn/unicorn/unicorn.vcxproj.filters +++ b/msvc/unicorn/unicorn/unicorn.vcxproj.filters @@ -406,27 +406,21 @@ qemu\include\qapi\qmp - - qemu\include\qapi\qmp - - - qemu\include\qapi\qmp - qemu\include\qapi\qmp qemu\include\qapi\qmp + + qemu\include\qapi\qmp + qemu\include\qapi\qmp qemu\include\qapi\qmp - - - qemu\include\qapi\qmp - + qemu\include\qemu diff --git a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj index d67a2cda..c770a423 100644 --- a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj +++ b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj @@ -141,7 +141,6 @@ - diff --git a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters index c983c143..17d4f11b 100644 --- a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters +++ b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters @@ -396,27 +396,21 @@ qemu\include\qapi\qmp - - qemu\include\qapi\qmp - - - qemu\include\qapi\qmp - qemu\include\qapi\qmp qemu\include\qapi\qmp + + qemu\include\qapi\qmp + qemu\include\qapi\qmp qemu\include\qapi\qmp - - qemu\include\qapi\qmp - qemu\include\qemu diff --git a/qemu/include/qapi/qmp/types.h b/qemu/include/qapi/qmp/types.h deleted file mode 100644 index 74dd3bf5..00000000 --- a/qemu/include/qapi/qmp/types.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Include all QEMU objects. - * - * Copyright (C) 2009 Red Hat Inc. - * - * Authors: - * Luiz Capitulino - * - * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. - * See the COPYING.LIB file in the top-level directory. - */ - -#ifndef QAPI_QMP_TYPES_H -#define QAPI_QMP_TYPES_H - -#include "qapi/qmp/qobject.h" -#include "qapi/qmp/qnum.h" -#include "qapi/qmp/qbool.h" -#include "qapi/qmp/qstring.h" -#include "qapi/qmp/qdict.h" -#include "qapi/qmp/qlist.h" -#include "qapi/qmp/qjson.h" - -#endif /* QAPI_QMP_TYPES_H */ diff --git a/qemu/qapi/qapi-dealloc-visitor.c b/qemu/qapi/qapi-dealloc-visitor.c index f929f46e..7b6b5768 100644 --- a/qemu/qapi/qapi-dealloc-visitor.c +++ b/qemu/qapi/qapi-dealloc-visitor.c @@ -16,7 +16,6 @@ #include "qapi/dealloc-visitor.h" #include "qemu/queue.h" #include "qemu-common.h" -#include "qapi/qmp/types.h" #include "qapi/visitor-impl.h" struct QapiDeallocVisitor diff --git a/qemu/qapi/qobject-input-visitor.c b/qemu/qapi/qobject-input-visitor.c index 703b281b..d5daff5a 100644 --- a/qemu/qapi/qobject-input-visitor.c +++ b/qemu/qapi/qobject-input-visitor.c @@ -17,8 +17,11 @@ #include "qapi/visitor-impl.h" #include "qemu/queue.h" #include "qemu-common.h" -#include "qapi/qmp/types.h" +#include "qapi/qmp/qbool.h" +#include "qapi/qmp/qdict.h" +#include "qapi/qmp/qlist.h" #include "qapi/qmp/qerror.h" +#include "qapi/qmp/qstring.h" typedef struct StackObject { const char *name; /* Name of @obj in its parent, if any */ diff --git a/qemu/qapi/qobject-output-visitor.c b/qemu/qapi/qobject-output-visitor.c index edd238f2..5f81146e 100644 --- a/qemu/qapi/qobject-output-visitor.c +++ b/qemu/qapi/qobject-output-visitor.c @@ -17,7 +17,10 @@ #include "qapi/visitor-impl.h" #include "qemu/queue.h" #include "qemu-common.h" -#include "qapi/qmp/types.h" +#include "qapi/qmp/qbool.h" +#include "qapi/qmp/qdict.h" +#include "qapi/qmp/qlist.h" +#include "qapi/qmp/qstring.h" #include "qapi/qmp/qerror.h" typedef struct QStackEntry