[lldb] Fix a circular include dependency (NFC) (#188931)
`lldb-private-types.h` includes `lldb-private.h`, which in turn includes `lldb-private-types.h`. Because of that, `lldb-public.h` included by `lldb-private.h` after `lldb-private-types.h` is not actually included. The practical consequence of this is that types defined in `lldb-public-types.h` (for example, `addr_t` needed downstream) are not available in `lldb-private-types.h`. Fix this by "including what you use", which is `lldb-types.h`.
This commit is contained in:
parent
58419354a8
commit
4d7339a14d
@ -10,7 +10,7 @@
|
||||
#define LLDB_INTERPRETER_OPTIONARGPARSER_H
|
||||
|
||||
#include "lldb/lldb-private-types.h"
|
||||
|
||||
#include "llvm/Support/Error.h"
|
||||
#include <optional>
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
@ -9,11 +9,9 @@
|
||||
#ifndef LLDB_LLDB_PRIVATE_TYPES_H
|
||||
#define LLDB_LLDB_PRIVATE_TYPES_H
|
||||
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
#include "lldb/lldb-types.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#include "RegisterContextWindows_i386.h"
|
||||
#include "RegisterContext_x86.h"
|
||||
#include "lldb-x86-register-enums.h"
|
||||
#include "lldb/lldb-defines.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#include "RegisterContextWindows_x86_64.h"
|
||||
#include "RegisterContext_x86.h"
|
||||
#include "lldb-x86-register-enums.h"
|
||||
#include "lldb/lldb-defines.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "lldb/Utility/ArchSpec.h"
|
||||
#include "lldb/lldb-defines.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/BinaryFormat/MachO.h"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user