[DWARF parser] Cleanup code in DWARFDebugAranges.
authorAlexey Samsonov <samsonov@google.com>
Fri, 25 Apr 2014 21:30:03 +0000 (21:30 +0000)
committerAlexey Samsonov <samsonov@google.com>
Fri, 25 Apr 2014 21:30:03 +0000 (21:30 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207276 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARFContext.cpp
lib/DebugInfo/DWARFDebugAranges.cpp
lib/DebugInfo/DWARFDebugAranges.h

index e74f1acdff56ca17284d6158b7c4ab783110b33c..08b7b9163776335fba4606a27e9b06a161859faf 100644 (file)
@@ -8,6 +8,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "DWARFContext.h"
+#include "DWARFDebugArangeSet.h"
+
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/Compression.h"
index 08864a06021832be10228650e32b96987c1472bd..4d7bf306f6cb8d84ad3770c5228df6213288ba3e 100644 (file)
@@ -10,6 +10,7 @@
 #include "DWARFDebugAranges.h"
 #include "DWARFCompileUnit.h"
 #include "DWARFContext.h"
+#include "DWARFDebugArangeSet.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
@@ -70,6 +71,11 @@ void DWARFDebugAranges::generate(DWARFContext *CTX) {
   sortAndMinimize();
 }
 
+void DWARFDebugAranges::clear() {
+  Aranges.clear();
+  ParsedCUOffsets.clear();
+}
+
 void DWARFDebugAranges::appendRange(uint32_t CUOffset, uint64_t LowPC,
                                     uint64_t HighPC) {
   if (!Aranges.empty()) {
index 35ad8e53d63d3546ca3ffe91318c7d3ed2863a9e..46b8bba6f4c715bb0d1a2fe954682c27add6f05e 100644 (file)
@@ -10,9 +10,8 @@
 #ifndef LLVM_DEBUGINFO_DWARFDEBUGARANGES_H
 #define LLVM_DEBUGINFO_DWARFDEBUGARANGES_H
 
-#include "DWARFDebugArangeSet.h"
 #include "llvm/ADT/DenseSet.h"
-#include <list>
+#include "llvm/Support/DataExtractor.h"
 
 namespace llvm {
 
@@ -20,20 +19,15 @@ class DWARFContext;
 
 class DWARFDebugAranges {
 public:
-  void clear() {
-    Aranges.clear();
-    ParsedCUOffsets.clear();
-  }
-
   void generate(DWARFContext *CTX);
-
-  // Use appendRange multiple times and then call sortAndMinimize.
-  void appendRange(uint32_t CUOffset, uint64_t LowPC, uint64_t HighPC);
-
   uint32_t findAddress(uint64_t Address) const;
 
 private:
+  void clear();
   void extract(DataExtractor DebugArangesData);
+
+  // Use appendRange multiple times and then call sortAndMinimize.
+  void appendRange(uint32_t CUOffset, uint64_t LowPC, uint64_t HighPC);
   void sortAndMinimize();
 
   struct Range {