Remove redundant header files and indirect references

Issue:https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I5GYY9

Test: sdk build success

Signed-off-by: xucheng46 <xucheng46@huawei.com>
Change-Id: Ia7d6c6ebc683a2e2f5b461aab2447c7aa6f12aff
This commit is contained in:
xucheng46 2022-07-18 21:32:52 +08:00
parent 7bf0744b8f
commit 59d4888d21
24 changed files with 96 additions and 51 deletions

View File

@ -16,12 +16,10 @@
#ifndef PANDA_RUNTIME_MEM_MEM_CONFIG_H
#define PANDA_RUNTIME_MEM_MEM_CONFIG_H
#include "macros.h"
#include "libpandabase/mem/mem.h"
#include "utils/asan_interface.h"
#include <cstddef>
#include "macros.h"
namespace panda::mem {
/**

View File

@ -15,6 +15,9 @@
#include "pool_map.h"
#include "mem/mem.h"
#include "mem/space.h"
namespace panda {
void PoolMap::AddPoolToMap(const void *pool_addr, size_t pool_size, SpaceType space_type, AllocatorType allocator_type,

View File

@ -16,8 +16,10 @@
#ifndef LIBPANDABASE_MEM_POOL_MAP_H
#define LIBPANDABASE_MEM_POOL_MAP_H
#include <cstddef>
#include <array>
#include <cstddef>
#include <cstdint>
#include "macros.h"
#include "mem.h"
#include "space.h"

View File

@ -15,6 +15,8 @@
#include "dfx_option.h"
#include "macros.h"
namespace panda::os::dfx_option {
/* static */

View File

@ -16,9 +16,8 @@
#ifndef PANDA_LIBPANDABASE_PBASE_OS_DFX_OPTION_H_
#define PANDA_LIBPANDABASE_PBASE_OS_DFX_OPTION_H_
#include "macros.h"
#include <cstdint>
#include <iosfwd>
#include <string>
namespace panda::os::dfx_option {

View File

@ -14,14 +14,19 @@
*/
#include "os/filesystem.h"
#include "utils/logger.h"
#if defined PANDA_TARGET_MOBILE || defined PANDA_TARGET_UNIX || defined PANDA_TARGET_ARM32 || defined PANDA_TARGET_ARM64
#include <ostream>
#include <string>
#if defined PANDA_TARGET_MOBILE || defined PANDA_TARGET_UNIX || defined PANDA_TARGET_ARM32 || \
defined PANDA_TARGET_ARM64
#include <sys/stat.h>
#endif
#if defined(PANDA_TARGET_WINDOWS)
#include <fileapi.h>
#endif
#include "utils/logger.h"
namespace panda::os {
void CreateDirectories(const std::string &folder_name)

View File

@ -16,17 +16,15 @@
#ifndef PANDA_FILESYSTEM_H
#define PANDA_FILESYSTEM_H
#include <iosfwd>
#include <string_view>
#include "macros.h"
#include <string>
#if defined(PANDA_TARGET_WINDOWS)
#ifndef NAME_MAX
constexpr size_t NAME_MAX = 255;
#endif // NAME_MAX
#elif defined(USE_STD_FILESYSTEM)
#include <filesystem>
#else
#include <experimental/filesystem>
#endif
namespace panda::os {

View File

@ -16,14 +16,14 @@
#ifndef PANDA_LIBPANDABASE_PBASE_OS_NATIVESTACK_H_
#define PANDA_LIBPANDABASE_PBASE_OS_NATIVESTACK_H_
#include "os/thread.h"
#include <set>
#include <signal.h> // NOLINTNEXTLINE(modernize-deprecated-headers)
#include <string>
#if defined(PANDA_TARGET_UNIX)
#include "platforms/unix/libpandabase/native_stack.h"
#endif // PANDA_TARGET_UNIX
#include <string>
#include <set>
#include <signal.h> // NOLINTNEXTLINE(modernize-deprecated-headers)
#include "os/thread.h"
namespace panda::os::native_stack {

View File

@ -16,12 +16,12 @@
#ifndef PANDA_LIBPANDABASE_PBASE_OS_PROP_H_
#define PANDA_LIBPANDABASE_PBASE_OS_PROP_H_
#include <string>
#if defined(PANDA_TARGET_UNIX)
#include "platforms/unix/libpandabase/property.h"
#endif // PANDA_TARGET_UNIX
#include <string>
namespace panda::os::property {
#if defined(PANDA_TARGET_UNIX)

View File

@ -15,6 +15,10 @@
#include "stacktrace.h"
#include <cstdint>
#include <iosfwd>
#include <vector>
namespace panda {
std::vector<uintptr_t> GetStacktrace()

View File

@ -15,6 +15,17 @@
#include "os/time.h"
#include <chrono>
#include <ctime>
#ifdef PANDA_TARGET_UNIX
#include "platforms/unix/libpandabase/time.h"
#elif PANDA_TARGET_WINDOWS
#include "platforms/windows/libpandabase/time.h"
#else
#error "Unsupported platform"
#endif // PANDA_TARGET_UNIX
namespace panda::os::time {
/**

View File

@ -16,14 +16,6 @@
#ifndef PANDA_LIBPANDABASE_PBASE_OS_TIME_H_
#define PANDA_LIBPANDABASE_PBASE_OS_TIME_H_
#ifdef PANDA_TARGET_UNIX
#include "platforms/unix/libpandabase/time.h"
#elif PANDA_TARGET_WINDOWS
#include "platforms/windows/libpandabase/time.h"
#else
#error "Unsupported platform"
#endif // PANDA_TARGET_UNIX
#include <macros.h>
#include <cstdint>

View File

@ -16,8 +16,11 @@
#ifndef PANDA_TRACE_H_
#define PANDA_TRACE_H_
#include <string>
#include <cstdint>
#include <iosfwd>
#include <sstream>
#include <string>
#include "macros.h"
namespace panda::trace {

View File

@ -13,7 +13,9 @@
* limitations under the License.
*/
#include <cstdlib>
#include <cstring>
#include <iosfwd>
#include <string>
#include "securec.h"

View File

@ -15,11 +15,14 @@
#include "type_converter.h"
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <ios>
#include <ostream>
#include <string_view>
#include <variant>
namespace panda::helpers {

View File

@ -17,9 +17,9 @@
#define PANDA_LIBPANDABASE_UTILS_TYPE_CONVERTER_H_
#include <array>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <cstddef>
#include <cstdint>
#include <iosfwd>
#include <string_view>
#include <variant>

View File

@ -15,10 +15,11 @@
#include "os/error.h"
#include <cerrno>
#include <cstring>
#include <array>
#include <cstring>
#include <iosfwd>
#include <string>
#include <variant>
namespace panda::os {

View File

@ -15,10 +15,17 @@
#include "os/exec.h"
#include <cstring>
#include <cerrno>
#include <iosfwd>
#include <string>
#include <unistd.h>
#include "macros.h"
#include "os/error.h"
#include "os/failure_retry.h"
#include "sys/wait.h"
#include "utils/expected.h"
#include "utils/span.h"
namespace panda::os::exec {

View File

@ -14,12 +14,11 @@
*/
#include "os/file.h"
#include "utils/type_helpers.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string_view>
#include "macros.h"
namespace panda::os::file {

View File

@ -16,25 +16,28 @@
#ifndef PANDA_LIBPANDABASE_PBASE_OS_UNIX_FILE_H_
#define PANDA_LIBPANDABASE_PBASE_OS_UNIX_FILE_H_
#include "os/error.h"
#include "utils/expected.h"
#include "utils/logger.h"
#include <array>
#include <cerrno>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <iosfwd>
#if PANDA_TARGET_MACOS
#include <mach-o/dyld.h>
// Undefine the conflict Mac marco
#undef BYTE_SIZE
#endif
#include <ostream>
#include <string>
#include <string_view>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <utility>
#include "macros.h"
#include "os/error.h"
#include "utils/expected.h"
#include "utils/logger.h"
namespace panda::os::unix::file {

View File

@ -18,6 +18,9 @@
#include <array>
#include <climits>
#include <cstdlib>
#include <iosfwd>
#include <string>
#include <string_view>
namespace panda::os {

View File

@ -16,6 +16,12 @@
#include "os/library_loader.h"
#include <dlfcn.h>
#include <iosfwd>
#include <string>
#include <string_view>
#include "os/error.h"
#include "utils/expected.h"
namespace panda::os::library_loader {
Expected<LibraryHandle, Error> Load(std::string_view filename)

View File

@ -16,6 +16,12 @@
#include "os/library_loader.h"
#include <dlfcn.h>
#include <iosfwd>
#include <string>
#include <string_view>
#include "os/error.h"
#include "utils/expected.h"
namespace panda::os::library_loader {

View File

@ -16,9 +16,7 @@
#ifndef PANDA_LIBPANDABASE_PBASE_OS_UNIX_PROP_H_
#define PANDA_LIBPANDABASE_PBASE_OS_UNIX_PROP_H_
#include <string>
#include <vector>
#include <map>
#include <iosfwd>
namespace panda::os::unix::property {