forked from OSchip/llvm-project
Move RangeMap.h into Utility
Summary: This file implements some general purpose data structures, and so it belongs to the Utility module. Reviewers: zturner, jingham, JDevlieghere, clayborg, espindola Subscribers: emaste, mgorny, javed.absar, arichardson, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D58970 llvm-svn: 355509
This commit is contained in:
parent
89e534746f
commit
b8093314ef
|
@ -9,13 +9,12 @@
|
|||
#ifndef DebugBase_dwarf_h_
|
||||
#define DebugBase_dwarf_h_
|
||||
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include <stdint.h>
|
||||
|
||||
// Get the DWARF constant definitions from llvm
|
||||
#include "llvm/BinaryFormat/Dwarf.h"
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
|
||||
// and stuff them in our default namespace
|
||||
using namespace llvm::dwarf;
|
||||
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
#ifndef liblldb_ArmUnwindInfo_h_
|
||||
#define liblldb_ArmUnwindInfo_h_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Symbol/ObjectFile.h"
|
||||
#include "lldb/Utility/DataExtractor.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
#include <vector>
|
||||
|
||||
/*
|
||||
* Unwind information reader and parser for the ARM exception handling ABI
|
||||
|
|
|
@ -9,17 +9,16 @@
|
|||
#ifndef liblldb_Block_h_
|
||||
#define liblldb_Block_h_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Core/AddressRange.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Symbol/CompilerType.h"
|
||||
#include "lldb/Symbol/LineEntry.h"
|
||||
#include "lldb/Symbol/SymbolContext.h"
|
||||
#include "lldb/Symbol/SymbolContextScope.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/Stream.h"
|
||||
#include "lldb/Utility/UserID.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
#include <vector>
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
|
|
|
@ -9,14 +9,13 @@
|
|||
#ifndef liblldb_CompactUnwindInfo_h_
|
||||
#define liblldb_CompactUnwindInfo_h_
|
||||
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Symbol/ObjectFile.h"
|
||||
#include "lldb/Symbol/UnwindPlan.h"
|
||||
#include "lldb/Utility/DataExtractor.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@
|
|||
#include <mutex>
|
||||
|
||||
#include "lldb/Core/AddressRange.h"
|
||||
#include "lldb/Utility/Flags.h"
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/dwarf.h"
|
||||
#include "lldb/Symbol/ObjectFile.h"
|
||||
#include "lldb/Symbol/UnwindPlan.h"
|
||||
#include "lldb/Utility/Flags.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/VMRange.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
#ifndef liblldb_LineTable_h_
|
||||
#define liblldb_LineTable_h_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Core/ModuleChild.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/Section.h"
|
||||
#include "lldb/Symbol/LineEntry.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
#include <vector>
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
#ifndef liblldb_Symtab_h_
|
||||
#define liblldb_Symtab_h_
|
||||
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/UniqueCStringMap.h"
|
||||
#include "lldb/Symbol/Symbol.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
|
|
|
@ -9,17 +9,16 @@
|
|||
#ifndef liblldb_Variable_h_
|
||||
#define liblldb_Variable_h_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Core/Mangled.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Expression/DWARFExpression.h"
|
||||
#include "lldb/Symbol/Declaration.h"
|
||||
#include "lldb/Utility/CompletionRequest.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/UserID.h"
|
||||
#include "lldb/lldb-enumerations.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
|
|
|
@ -9,14 +9,12 @@
|
|||
#ifndef liblldb_Memory_h_
|
||||
#define liblldb_Memory_h_
|
||||
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
namespace lldb_private {
|
||||
//----------------------------------------------------------------------
|
||||
// A class to track memory that was read from a live process between
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#ifndef lldb_MemoryRegionInfo_h
|
||||
#define lldb_MemoryRegionInfo_h
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "llvm/Support/FormatProviders.h"
|
||||
#include "lldb/Utility/ConstString.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "llvm/Support/FormatProviders.h"
|
||||
|
||||
namespace lldb_private {
|
||||
class MemoryRegionInfo {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef liblldb_RangeMap_h_
|
||||
#define liblldb_RangeMap_h_
|
||||
#ifndef LLDB_UTILITY_RANGEMAP_H
|
||||
#define LLDB_UTILITY_RANGEMAP_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
@ -53,10 +53,8 @@ template <typename B, typename S> struct Range {
|
|||
|
||||
void Slide(BaseType slide) { base += slide; }
|
||||
|
||||
bool Union(const Range &rhs)
|
||||
{
|
||||
if (DoesAdjoinOrIntersect(rhs))
|
||||
{
|
||||
bool Union(const Range &rhs) {
|
||||
if (DoesAdjoinOrIntersect(rhs)) {
|
||||
auto new_end = std::max<BaseType>(GetRangeEnd(), rhs.GetRangeEnd());
|
||||
base = std::min<BaseType>(base, rhs.base);
|
||||
size = new_end - base;
|
||||
|
@ -569,7 +567,6 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
|
||||
void CombinePrevAndNext(typename Collection::iterator pos) {
|
||||
// Check if the prev or next entries in case they need to be unioned with
|
||||
// the entry pointed to by "pos".
|
||||
|
@ -947,4 +944,4 @@ protected:
|
|||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // liblldb_RangeMap_h_
|
||||
#endif // LLDB_UTILITY_RANGEMAP_H
|
|
@ -16,7 +16,6 @@
|
|||
#include "lldb/Core/Module.h"
|
||||
#include "lldb/Core/ModuleSpec.h"
|
||||
#include "lldb/Core/PluginManager.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/Section.h"
|
||||
#include "lldb/Host/FileSystem.h"
|
||||
#include "lldb/Symbol/DWARFCallFrameInfo.h"
|
||||
|
@ -26,6 +25,7 @@
|
|||
#include "lldb/Utility/ArchSpec.h"
|
||||
#include "lldb/Utility/DataBufferHeap.h"
|
||||
#include "lldb/Utility/Log.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/Status.h"
|
||||
#include "lldb/Utility/Stream.h"
|
||||
#include "lldb/Utility/Timer.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "lldb/Core/Module.h"
|
||||
#include "lldb/Core/ModuleSpec.h"
|
||||
#include "lldb/Core/PluginManager.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/Section.h"
|
||||
#include "lldb/Core/StreamFile.h"
|
||||
#include "lldb/Host/Host.h"
|
||||
|
@ -28,6 +27,7 @@
|
|||
#include "lldb/Utility/DataBufferHeap.h"
|
||||
#include "lldb/Utility/FileSpec.h"
|
||||
#include "lldb/Utility/Log.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/StreamString.h"
|
||||
#include "lldb/Utility/Timer.h"
|
||||
#include "lldb/Utility/UUID.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "lldb/Core/Module.h"
|
||||
#include "lldb/Core/ModuleSpec.h"
|
||||
#include "lldb/Core/PluginManager.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/Section.h"
|
||||
#include "lldb/Core/StreamFile.h"
|
||||
#include "lldb/Host/Host.h"
|
||||
|
@ -35,6 +34,7 @@
|
|||
#include "lldb/Utility/DataBuffer.h"
|
||||
#include "lldb/Utility/FileSpec.h"
|
||||
#include "lldb/Utility/Log.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/RegisterValue.h"
|
||||
#include "lldb/Utility/Status.h"
|
||||
#include "lldb/Utility/StreamString.h"
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
#include "lldb/Core/Address.h"
|
||||
#include "lldb/Core/FileSpecList.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Host/SafeMachO.h"
|
||||
#include "lldb/Symbol/ObjectFile.h"
|
||||
#include "lldb/Utility/FileSpec.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/UUID.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
#define SymbolFileDWARF_DWARFDebugAranges_h_
|
||||
|
||||
#include "DWARFDebugArangeSet.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include <list>
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
|
||||
class SymbolFileDWARF;
|
||||
|
||||
class DWARFDebugAranges {
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/Support/Threading.h"
|
||||
|
||||
#include "lldb/Utility/Flags.h"
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/UniqueCStringMap.h"
|
||||
#include "lldb/Core/dwarf.h"
|
||||
#include "lldb/Expression/DWARFExpression.h"
|
||||
|
@ -29,6 +26,8 @@
|
|||
#include "lldb/Symbol/SymbolContext.h"
|
||||
#include "lldb/Symbol/SymbolFile.h"
|
||||
#include "lldb/Utility/ConstString.h"
|
||||
#include "lldb/Utility/Flags.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
#include "DWARFDataExtractor.h"
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
#include "lldb/Core/Module.h"
|
||||
#include "lldb/Core/ModuleList.h"
|
||||
#include "lldb/Core/PluginManager.h"
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Core/Section.h"
|
||||
#include "lldb/Host/FileSystem.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/RegularExpression.h"
|
||||
#include "lldb/Utility/Timer.h"
|
||||
|
||||
|
|
|
@ -9,14 +9,13 @@
|
|||
#ifndef SymbolFileDWARF_SymbolFileDWARFDebugMap_h_
|
||||
#define SymbolFileDWARF_SymbolFileDWARFDebugMap_h_
|
||||
|
||||
#include "lldb/Symbol/SymbolFile.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "llvm/Support/Chrono.h"
|
||||
#include <bitset>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Symbol/SymbolFile.h"
|
||||
#include "llvm/Support/Chrono.h"
|
||||
|
||||
#include "UniqueDWARFASTType.h"
|
||||
|
||||
class SymbolFileDWARF;
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "lldb/Target/Memory.h"
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Target/Process.h"
|
||||
#include "lldb/Utility/DataBufferHeap.h"
|
||||
#include "lldb/Utility/Log.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "lldb/Utility/State.h"
|
||||
|
||||
#include <cinttypes>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
add_lldb_unittest(LLDBCoreTests
|
||||
MangledTest.cpp
|
||||
RangeMapTest.cpp
|
||||
RangeTest.cpp
|
||||
RichManglingContextTest.cpp
|
||||
StreamCallbackTest.cpp
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ add_lldb_unittest(UtilityTests
|
|||
NameMatchesTest.cpp
|
||||
PredicateTest.cpp
|
||||
ProcessInfoTest.cpp
|
||||
RangeMapTest.cpp
|
||||
RangeTest.cpp
|
||||
RegisterValueTest.cpp
|
||||
ReproducerTest.cpp
|
||||
ReproducerInstrumentationTest.cpp
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
|
@ -6,8 +6,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "lldb/Core/RangeMap.h"
|
||||
|
||||
#include "lldb/Utility/RangeMap.h"
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
|
Loading…
Reference in New Issue